diff --git a/.github/workflows/zcash-lightwalletd.yml b/.github/workflows/zcash-lightwalletd.yml index cd4d12622..e0cf95334 100644 --- a/.github/workflows/zcash-lightwalletd.yml +++ b/.github/workflows/zcash-lightwalletd.yml @@ -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 @@ -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 @@ -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