We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23f6b03 commit d2dadb3Copy full SHA for d2dadb3
1 file changed
.github/workflows/build-docker.yml
@@ -57,6 +57,9 @@ jobs:
57
[registry."docker.io"]
58
mirrors = ["dockerhub-proxy.teonite.net"]
59
60
+ - name: Sanitize branch name
61
+ run: echo "SAFE_REF=${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV
62
+
63
- name: Build container
64
uses: docker/build-push-action@v7
65
with:
@@ -65,8 +68,10 @@ jobs:
68
provenance: false
66
69
push: true
67
70
tags: "${{ env.GHCR_REPO }}:${{ github.sha }}-${{ matrix.tag }}"
- cache-from: type=gha
- cache-to: type=gha,mode=max
71
+ cache-from: |
72
+ type=registry,ref=${{ env.GHCR_REPO }}:cache-${{ matrix.tag }}
73
+ type=registry,ref=${{ env.GHCR_REPO }}:cache-${{ matrix.tag }}-${{ env.SAFE_REF }}
74
+ cache-to: type=registry,mode=max,ref=${{ env.GHCR_REPO }}:cache-${{ matrix.tag }}-${{ env.SAFE_REF }}
75
76
- name: Scan image with Trivy
77
uses: aquasecurity/trivy-action@v0.36.0
0 commit comments