diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41736b78..f70935f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,9 +59,6 @@ jobs: # The .ts scripts depend upon this - run: npm install --global tsx - - name: Export vars of Actions Runtime for caching - uses: crazy-max/ghaction-github-runtime@v3 - - name: build use images run: ./buildUseImages.ts @@ -83,9 +80,8 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - # use GitHub Actions Cache https://github.com/moby/buildkit#github-actions-cache-experimental - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main + cache-to: type=inline - name: notify on failure if: failure() && github.event_name != 'pull_request' diff --git a/buildTestImages.ts b/buildTestImages.ts index c7a6ef45..ce103c6a 100755 --- a/buildTestImages.ts +++ b/buildTestImages.ts @@ -21,24 +21,14 @@ const proposals = match ? allProposals.filter(p => p.proposalName.includes(match)) : allProposals; -function buildOptsFor(name: string) { - // use GitHub Actions Cache if enabled https://docs.docker.com/build/cache/backends/gha/ - if (process.env.ACTIONS_RUNTIME_TOKEN) { - const refName = process.env.GITHUB_REF_NAME; - return `--cache-from type=gha,scope=${refName}-${name} --cache-to type=gha,mode=max,scope=${refName}-${name}`; - } - return ''; -} - for (const proposal of proposals) { if (!dry) { console.log(`\nBuilding test image for proposal ${proposal.proposalName}`); } const { name, target } = imageNameForProposal(proposal, 'test'); - const opts = buildOptsFor(name); // 'load' to ensure the images are output to the Docker client. Seems to be necessary // for the CI docker/build-push-action to re-use the cached stages. - const cmd = `docker buildx build ${opts} --load --tag ${name} --target ${target} .`; + const cmd = `docker buildx build --load --tag ${name} --target ${target} .`; console.log(cmd); if (!dry) { execSync(cmd, { stdio: 'inherit' });