name: build python on: workflow_dispatch: push: tags: - 'python-*' pull_request: push: branches: - '**' jobs: docker: runs-on: ubuntu-latest strategy: fail-fast: false matrix: v: - 2.7 - 3.7 - 3.8 - 3.9 - 3.10 - 3.11 - 3.12 - 3.13 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: ./python/${{ matrix.v }} file: ./python/${{ matrix.v }}/Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: | git.chillcog.com/yolks/python:${{ matrix.v }} ${{ startsWith(github.ref, 'refs/tags/') && format('git.chillcog.com/yolks/python:{0}', github.ref_name) || '' }}