summaryrefslogtreecommitdiff
path: root/.github/workflows/docker.yml
diff options
context:
space:
mode:
authorFinlay Davidson <finlay.davidson@coderclass.nl>2022-07-03 21:42:23 +0200
committerJF <JF002@users.noreply.github.com>2022-07-08 17:13:47 +0200
commitc3bd04f4974a1c954278fa955dd71c8cf24a60a6 (patch)
treee063b402da2367a3a36de2999f3d7620aea74f50 /.github/workflows/docker.yml
parent1b971eebaead49dc9c40e309c9fce127eaaff98a (diff)
Make Docker workflow push to latest and commit sha
Diffstat (limited to '.github/workflows/docker.yml')
-rw-r--r--.github/workflows/docker.yml14
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