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