mozhi/.gitea/workflows/push.yml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 56: mapping key "name" already defined at line 54 line 59: mapping key "name" already defined at line 54 line 61: mapping key "name" already defined at line 54 line 64: mapping key "name" already defined at line 54 line 66: mapping key "name" already defined at line 54 line 57: mapping key "path" already defined at line 55 line 60: mapping key "path" already defined at line 55 line 62: mapping key "path" already defined at line 55 line 65: mapping key "path" already defined at line 55 line 67: mapping key "path" already defined at line 55 line 59: mapping key "name" already defined at line 56 line 61: mapping key "name" already defined at line 56 line 64: mapping key "name" already defined at line 56 line 66: mapping key "name" already defined at line 56 line 60: mapping key "path" already defined at line 57 line 62: mapping key "path" already defined at line 57 line 65: mapping key "path" already defined at line 57 line 67: mapping key "path" already defined at line 57 line 61: mapping key "name" already defined at line 59 line 64: mapping key "name" already defined at line 59 line 66: mapping key "name" already defined at line 59 line 62: mapping key "path" already defined at line 60 line 65: mapping key "path" already defined at line 60 line 67: mapping key "path" already defined at line 60 line 64: mapping key "name" already defined at line 61 line 66: mapping key "name" already defined at line 61 line 65: mapping key "path" already defined at line 62 line 67: mapping key "path" already defined at line 62 line 66: mapping key "name" already defined at line 64 line 67: mapping key "path" already defined at line 65
2023-08-30 19:48:57 +05:30

68 lines
2.0 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: Check out the repo
uses: actions/checkout@v3
- name: Install docker
uses: papodaca/install-docker-action@main
- name: Log in to registry
uses: docker/login-action@v2
with:
username: aryak
password: ${{ secrets.MOZHI_DOCKER_PASSWORD }}
registry: codeberg.org
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: codeberg.org/aryak/mozhi:latest
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: |
go mod download
go install github.com/swaggo/swag/cmd/swag@latest
swag init
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: mozhi-linux-arm64
path: mozhi-linux-arm64
name: mozhi-windows-amd64.exe
path: mozhi-windows-amd64.exe
name: mozhi-windows-arm64.exe
path: mozhi-windows-arm64.exe
name: mozhi-darwin-amd64
path: mozhi-darwin-amd64
name: mozhi-darwin-arm64
path: mozhi-darwin-arm64