Skip to content

Commit 4b6e2fe

Browse files
fix(build): sync LWD builder with our build-docker-image.yml workflow (#6634)
After migrating to our new GCP project, some references were not being applied correctly, as this workflow was not referencing new resources the right way. It was even outdated on some specific parts.
1 parent f6c6311 commit 4b6e2fe

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/zcash-lightwalletd.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
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
13
name: zcash-lightwalletd
24

35
# Ensures that only one workflow task will run at a time. Previous builds, if
@@ -77,18 +79,21 @@ jobs:
7779
with:
7880
# list of Docker images to use as base name for tags
7981
images: |
80-
${{ vars.GAR_BASE }}/${{ env.IMAGE_NAME }}
82+
us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra/${{ env.IMAGE_NAME }}
8183
# generate Docker tags based on the following events/attributes
8284
# set latest tag for default branch
8385
tags: |
8486
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
8788
type=semver,pattern={{version}}
8889
type=semver,pattern={{major}}.{{minor}}
8990
type=semver,pattern={{major}}
91+
type=ref,event=tag
92+
type=ref,event=branch
93+
type=ref,event=pr
9094
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}}
9297
9398
- name: Set up QEMU
9499
id: qemu
@@ -142,5 +147,8 @@ jobs:
142147
tags: ${{ steps.meta.outputs.tags }}
143148
labels: ${{ steps.meta.outputs.labels }}
144149
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

Comments
 (0)