]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/black/.github/workflows/docker.yml

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '882d8795c6ff65c02f2657e596391748d1b6b7f5'
[etc/vim.git] / .vim / bundle / black / .github / workflows / docker.yml
1 name: docker
2
3 on:
4   push:
5     branches:
6       - "main"
7   release:
8     types: [published]
9
10 permissions:
11   contents: read
12
13 jobs:
14   docker:
15     if: github.repository == 'psf/black'
16     runs-on: ubuntu-latest
17     steps:
18       - name: Checkout
19         uses: actions/checkout@v4
20
21       - name: Set up QEMU
22         uses: docker/setup-qemu-action@v3
23
24       - name: Set up Docker Buildx
25         uses: docker/setup-buildx-action@v3
26
27       - name: Login to DockerHub
28         uses: docker/login-action@v3
29         with:
30           username: ${{ secrets.DOCKERHUB_USERNAME }}
31           password: ${{ secrets.DOCKERHUB_TOKEN }}
32
33       - name: Check + set version tag
34         run:
35           echo "GIT_TAG=$(git describe --candidates=0 --tags 2> /dev/null || echo
36           latest_non_release)" >> $GITHUB_ENV
37
38       - name: Build and push
39         uses: docker/build-push-action@v5
40         with:
41           context: .
42           platforms: linux/amd64,linux/arm64
43           push: true
44           tags: pyfound/black:latest,pyfound/black:${{ env.GIT_TAG }}
45
46       - name: Build and push latest_release tag
47         if:
48           ${{ github.event_name == 'release' && github.event.action == 'published' &&
49           !github.event.release.prerelease }}
50         uses: docker/build-push-action@v5
51         with:
52           context: .
53           platforms: linux/amd64,linux/arm64
54           push: true
55           tags: pyfound/black:latest_release
56
57       - name: Build and push latest_prerelease tag
58         if:
59           ${{ github.event_name == 'release' && github.event.action == 'published' &&
60           github.event.release.prerelease }}
61         uses: docker/build-push-action@v5
62         with:
63           context: .
64           platforms: linux/amd64,linux/arm64
65           push: true
66           tags: pyfound/black:latest_prerelease
67
68       - name: Image digest
69         run: echo ${{ steps.docker_build.outputs.digest }}