|
| 1 | +# TODO: we should stop using this build approach with lightwalletd and move to using our |
| 2 | +# reusable workflow to building all the docker images of our repo |
1 | 3 | name: zcash-lightwalletd
|
2 | 4 |
|
3 | 5 | # Ensures that only one workflow task will run at a time. Previous builds, if
|
@@ -77,18 +79,21 @@ jobs:
|
77 | 79 | with:
|
78 | 80 | # list of Docker images to use as base name for tags
|
79 | 81 | images: |
|
80 |
| - ${{ vars.GAR_BASE }}/${{ env.IMAGE_NAME }} |
| 82 | + us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra/${{ env.IMAGE_NAME }} |
81 | 83 | # generate Docker tags based on the following events/attributes
|
82 | 84 | # set latest tag for default branch
|
83 | 85 | tags: |
|
84 | 86 | type=schedule
|
85 |
| - type=ref,event=branch |
86 |
| - type=ref,event=pr |
| 87 | + # semver and ref,tag automatically add a "latest" tag, but only on stable releases |
87 | 88 | type=semver,pattern={{version}}
|
88 | 89 | type=semver,pattern={{major}}.{{minor}}
|
89 | 90 | type=semver,pattern={{major}}
|
| 91 | + type=ref,event=tag |
| 92 | + type=ref,event=branch |
| 93 | + type=ref,event=pr |
90 | 94 | type=sha
|
91 |
| - type=raw,value=latest,enable={{is_default_branch}} |
| 95 | + # edge is the latest commit on the default branch. |
| 96 | + type=edge,enable={{is_default_branch}} |
92 | 97 |
|
93 | 98 | - name: Set up QEMU
|
94 | 99 | id: qemu
|
@@ -142,5 +147,8 @@ jobs:
|
142 | 147 | tags: ${{ steps.meta.outputs.tags }}
|
143 | 148 | labels: ${{ steps.meta.outputs.labels }}
|
144 | 149 | push: true
|
145 |
| - cache-from: type=registry,ref=${{ vars.GAR_BASE }}/${{ env.IMAGE_NAME }}:buildcache |
146 |
| - cache-to: type=registry,ref=${{ vars.GAR_BASE }}/${{ env.IMAGE_NAME }}:buildcache,mode=max |
| 150 | + cache-from: | |
| 151 | + type=registry,ref=us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra-caching/${{ env.IMAGE_NAME }}:${{ env.GITHUB_REF_SLUG_URL }}-cache |
| 152 | + type=registry,ref=us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra-caching/${{ env.IMAGE_NAME }}:main-cache |
| 153 | + cache-to: | |
| 154 | + type=registry,ref=us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra-caching/${{ env.IMAGE_NAME }}:${{ env.GITHUB_REF_SLUG_URL }}-cache,mode=max |
0 commit comments