All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
15 if: github.repository == 'psf/black'
16 runs-on: ubuntu-latest
19 uses: actions/checkout@v3
22 uses: docker/setup-qemu-action@v2
24 - name: Set up Docker Buildx
25 uses: docker/setup-buildx-action@v2
27 - name: Login to DockerHub
28 uses: docker/login-action@v2
30 username: ${{ secrets.DOCKERHUB_USERNAME }}
31 password: ${{ secrets.DOCKERHUB_TOKEN }}
33 - name: Check + set version tag
35 echo "GIT_TAG=$(git describe --candidates=0 --tags 2> /dev/null || echo
36 latest_non_release)" >> $GITHUB_ENV
38 - name: Build and push
39 uses: docker/build-push-action@v3
42 platforms: linux/amd64,linux/arm64
44 tags: pyfound/black:latest,pyfound/black:${{ env.GIT_TAG }}
46 - name: Build and push latest_release tag
48 ${{ github.event_name == 'release' && github.event.action == 'published' &&
49 !github.event.release.prerelease }}
50 uses: docker/build-push-action@v3
53 platforms: linux/amd64,linux/arm64
55 tags: pyfound/black:latest_release
57 - name: Build and push latest_prerelease tag
59 ${{ github.event_name == 'release' && github.event.action == 'published' &&
60 github.event.release.prerelease }}
61 uses: docker/build-push-action@v3
64 platforms: linux/amd64,linux/arm64
66 tags: pyfound/black:latest_prerelease
69 run: echo ${{ steps.docker_build.outputs.digest }}