mozhi/.gitea/workflows/push.yml
Arya Kiran e8ec90044a
Some checks failed
mozhi pipeline / Push Docker image to Codeberg docker registry (push) Failing after 7s
mozhi pipeline / Build and publish artifacts (push) Has been cancelled
seems like v4 isnt supported by act_runner
2023-09-21 22:01:45 +05:30

83 lines
2.7 KiB
YAML

name: mozhi pipeline
on: push
jobs:
push_to_registry:
runs-on: ubuntu-latest
name: Push Docker image to Codeberg docker registry
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: aryak
password: ${{ secrets.MOZHI_DOCKER_PASSWORD }}
registry: codeberg.org
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: codeberg.org/aryak/mozhi:latest
platforms: linux/amd64, linux/arm64
build_artifact:
runs-on: ubuntu-latest
name: Build and publish artifacts
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Setup Go compiler
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build mozhi
run: |
export GOPRIVATE=codeberg.org/aryak/libmozhi
go mod download
go run github.com/swaggo/swag/cmd/swag@latest init --parseDependency
GOOS=linux GOARCH=amd64 go build -o mozhi-linux-amd64
GOOS=linux GOARCH=arm64 go build -o mozhi-linux-arm64
GOOS=windows GOARCH=amd64 go build -o mozhi-windows-amd64.exe
GOOS=windows GOARCH=arm64 go build -o mozhi-windows-arm64.exe
GOOS=darwin GOARCH=amd64 go build -o mozhi-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -o mozhi-darwin-arm64
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: mozhi-linux-amd64
path: mozhi-linux-amd64
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: mozhi-linux-arm64
path: mozhi-linux-arm64
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: mozhi-windows-amd64.exe
path: mozhi-windows-amd64.exe
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: mozhi-windows-arm64.exe
path: mozhi-windows-arm64.exe
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: mozhi-darwin-amd64
path: mozhi-darwin-amd64
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: mozhi-darwin-arm64
path: mozhi-darwin-arm64