diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f278504f..30976561 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,9 +59,7 @@ jobs: - name: Build and upload to ghcr.io 📤 id: build-upload - # We need to pin exact version here, since updates can break - # the extract-image-names.sh script - uses: docker/bake-action@v6.9.0 + uses: docker/bake-action@v6.10.0 with: push: true # Using provenance to disable default attestation so it will build only desired images: @@ -77,6 +75,14 @@ jobs: build.json .github/workflows/env.hcl + # The metadata output is huge so we need to first write it to file + # https://github.com/aiidalab/aiidalab-docker-stack/issues/493 + - name: Write metadata output to a json file + run: | + cat << EOF > bake_metadata.json + ${{ steps.build-upload.outputs.metadata }} + EOF + - name: Set output variables id: set-output uses: actions/github-script@v8 @@ -91,7 +97,8 @@ jobs: # "LAB_IMAGE":"ghcr.io/aiidalab/lab@sha256:e8c7b3a662660ad20fef7...", # } script: | - const bake_output = JSON.parse(process.env.BAKE_METADATA, 'utf-8'); + const fs = require('fs'); + const bake_output = JSON.parse(fs.readFileSync('bake_metadata.json', 'utf8')); images = {}; for (const key in bake_output) { const image = bake_output[key]; @@ -104,5 +111,3 @@ jobs: } console.log(images); return images; - env: - BAKE_METADATA: ${{ steps.build-upload.outputs.metadata }}