name: build go on: workflow_dispatch: push: tags: - 'go-*' pull_request: push: branches: - '**' jobs: docker: runs-on: ubuntu-latest strategy: fail-fast: false matrix: v: - 1.14 - 1.15 - 1.16 - 1.17 - 1.18 - 1.19 - 1.20 - 1.21 - 1.22 - 1.23 steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.sha }} - name: Login to registry (tags only) if: startsWith(github.ref, 'refs/tags/') uses: docker/login-action@v3 with: registry: git.chillcog.com username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} - name: Build & push uses: docker/build-push-action@v6 with: context: ./go/${{ matrix.v }} file: ./go/${{ matrix.v }}/Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: | git.chillcog.com/yolks/go:${{ matrix.v }} ${{ startsWith(github.ref, 'refs/tags/') && format('git.chillcog.com/yolks/go:{0}', github.ref_name) || '' }}