]> 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:

Prepare for release 21.12b0 (GH-2673)
[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 jobs:
11   docker:
12     if: github.repository == 'psf/black'
13     runs-on: ubuntu-latest
14     steps:
15       - name: Checkout
16         uses: actions/checkout@v2
17
18       - name: Set up QEMU
19         uses: docker/setup-qemu-action@v1
20
21       - name: Set up Docker Buildx
22         uses: docker/setup-buildx-action@v1
23
24       - name: Login to DockerHub
25         uses: docker/login-action@v1
26         with:
27           username: ${{ secrets.DOCKERHUB_USERNAME }}
28           password: ${{ secrets.DOCKERHUB_TOKEN }}
29
30       - name: Check + set version tag
31         run:
32           echo "GIT_TAG=$(git describe --candidates=0 --tags 2> /dev/null || echo
33           latest_non_release)" >> $GITHUB_ENV
34
35       - name: Build and push
36         uses: docker/build-push-action@v2
37         with:
38           context: .
39           platforms: linux/amd64,linux/arm64
40           push: true
41           tags: pyfound/black:latest,pyfound/black:${{ env.GIT_TAG }}
42
43       - name: Build and push latest_release tag
44         if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
45         uses: docker/build-push-action@v2
46         with:
47           context: .
48           platforms: linux/amd64,linux/arm64
49           push: true
50           tags: pyfound/black:latest_release
51
52       - name: Image digest
53         run: echo ${{ steps.docker_build.outputs.digest }}