Skip to content

Commit

Permalink
fix(build): sync LWD builder with our build-docker-image.yml workfl…
Browse files Browse the repository at this point in the history
…ow (#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.
  • Loading branch information
gustavovalverde authored May 8, 2023
1 parent f6c6311 commit 4b6e2fe
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/zcash-lightwalletd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# TODO: we should stop using this build approach with lightwalletd and move to using our
# reusable workflow to building all the docker images of our repo
name: zcash-lightwalletd

# Ensures that only one workflow task will run at a time. Previous builds, if
Expand Down Expand Up @@ -77,18 +79,21 @@ jobs:
with:
# list of Docker images to use as base name for tags
images: |
${{ vars.GAR_BASE }}/${{ env.IMAGE_NAME }}
us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra/${{ env.IMAGE_NAME }}
# generate Docker tags based on the following events/attributes
# set latest tag for default branch
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
# semver and ref,tag automatically add a "latest" tag, but only on stable releases
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=tag
type=ref,event=branch
type=ref,event=pr
type=sha
type=raw,value=latest,enable={{is_default_branch}}
# edge is the latest commit on the default branch.
type=edge,enable={{is_default_branch}}
- name: Set up QEMU
id: qemu
Expand Down Expand Up @@ -142,5 +147,8 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true
cache-from: type=registry,ref=${{ vars.GAR_BASE }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ vars.GAR_BASE }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
cache-from: |
type=registry,ref=us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra-caching/${{ env.IMAGE_NAME }}:${{ env.GITHUB_REF_SLUG_URL }}-cache
type=registry,ref=us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra-caching/${{ env.IMAGE_NAME }}:main-cache
cache-to: |
type=registry,ref=us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra-caching/${{ env.IMAGE_NAME }}:${{ env.GITHUB_REF_SLUG_URL }}-cache,mode=max

0 comments on commit 4b6e2fe

Please sign in to comment.