]> git.madduck.net Git - etc/vim.git/blob - .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:

Bump docker/setup-qemu-action from 1 to 2 (#3056)
[etc/vim.git] / .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@v3
20
21       - name: Set up QEMU
22         uses: docker/setup-qemu-action@v2
23
24       - name: Set up Docker Buildx
25         uses: docker/setup-buildx-action@v1
26
27       - name: Login to DockerHub
28         uses: docker/login-action@v1
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@v2
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: ${{ github.event_name == 'release' && github.event.action == 'published' }}
48         uses: docker/build-push-action@v2
49         with:
50           context: .
51           platforms: linux/amd64,linux/arm64
52           push: true
53           tags: pyfound/black:latest_release
54
55       - name: Image digest
56         run: echo ${{ steps.docker_build.outputs.digest }}