From 1047946a239fcca56789ee3108cebc1f2e627689 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Sat, 25 Mar 2023 16:58:54 +0100 Subject: [PATCH] =?UTF-8?q?CI:=20minor=20tweaks=20=F0=9F=92=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-image.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index fd1973a..7e55595 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -32,12 +32,15 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - name: build Docker image & push to Docker Hub - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: push: true tags: | derhuerst/db-rest:6 derhuerst/db-rest:latest + # https://docs.docker.com/build/ci/github-actions/examples/#github-cache + cache-from: type=gha + cache-to: type=gha,mode=max,oci-mediatypes=true,compression=zstd # this is for the public-transport/infrastructure cluster - name: log in to GitHub Container Registry @@ -53,7 +56,10 @@ jobs: id: datetime run: echo "::set-output name=datetime::$(date -u +'%Y-%m-%dT%H.%M.%SZ')" - name: push Docker image to GitHub Registry - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: push: true tags: ghcr.io/${{github.repository}}:v6_${{steps.hash.outputs.hash}}_${{steps.datetime.outputs.datetime}} + # https://docs.docker.com/build/ci/github-actions/examples/#github-cache + cache-from: type=gha + cache-to: type=gha,mode=max,oci-mediatypes=true,compression=zstd