name: build dotnet on: workflow_dispatch: push: tags: - 'dotnet-*' pull_request: push: branches: - '**' jobs: docker: runs-on: ubuntu-latest strategy: fail-fast: false matrix: v: - 2.1 - 3.1 - 5 - 6 - 7 - 8 - 9 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: ./dotnet/${{ matrix.v }} file: ./dotnet/${{ matrix.v }}/Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: | git.chillcog.com/yolks/dotnet:${{ matrix.v }} ${{ startsWith(github.ref, 'refs/tags/') && format('git.chillcog.com/yolks/dotnet:{0}', github.ref_name) || '' }}