From 85be39414be260bafc9af24a522b7111345fb712 Mon Sep 17 00:00:00 2001 From: Connor Smith Date: Wed, 12 Apr 2023 10:57:13 +1000 Subject: [PATCH] Add caching and improved tagging to container publish action --- .github/workflows/publish-docker-image.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml index 134fd07..c86a62f 100644 --- a/.github/workflows/publish-docker-image.yml +++ b/.github/workflows/publish-docker-image.yml @@ -18,6 +18,11 @@ jobs: uses: docker/metadata-action@v4 with: images: zetifi/docker-irestarter + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -34,5 +39,8 @@ jobs: uses: docker/build-push-action@v3 with: push: true - tags: zetifi/docker-irestarter:latest - platforms: linux/arm64/v8,linux/amd64 \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }}, zetifi/docker-irestarter:latest + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/arm64/v8,linux/amd64 + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file