diff options
author | Finlay Davidson <finlay.davidson@coderclass.nl> | 2022-07-03 21:42:23 +0200 |
---|---|---|
committer | JF <JF002@users.noreply.github.com> | 2022-07-08 17:13:47 +0200 |
commit | c3bd04f4974a1c954278fa955dd71c8cf24a60a6 (patch) | |
tree | e063b402da2367a3a36de2999f3d7620aea74f50 /.github | |
parent | 1b971eebaead49dc9c40e309c9fce127eaaff98a (diff) |
Make Docker workflow push to latest and commit sha
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/docker.yml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0ad1adb5..b2905267 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -25,10 +25,21 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME || env.USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Set up Docker metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ secrets.DOCKER_HUB_USERNAME || env.USERNAME }}/infinitime-build + tags: | + type=sha + type=raw,value=latest + - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx + id: buildx uses: docker/setup-buildx-action@v2 - name: Build and push @@ -40,7 +51,8 @@ jobs: platforms: linux/amd64,linux/arm64 builder: ${{ steps.buildx.outputs.name }} push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME || env.USERNAME }}/infinitime-build:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME || env.USERNAME }}/infinitime-build:buildcache cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME || env.USERNAME }}/infinitime-build:buildcache,mode=max |