-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pin docker/bake-action to fix build (#492)
Pin bake-action to 5.5.0, new version has a different metadata format that break jq script in extract-image-names.sh. (it also broke because the metadata json is now to large to be passed as env variable, this is fixed here by cat'ing it to a file.
- Loading branch information
1 parent
9cab122
commit 5ee3ab8
Showing
2 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,9 @@ jobs: | |
|
||
- name: Build and upload to ghcr.io 📤 | ||
id: build-upload | ||
uses: docker/bake-action@v5 | ||
# We need to pin exact version here, since updates can break | ||
# the extract-image-names.sh script | ||
uses: docker/[email protected] | ||
with: | ||
push: true | ||
# Using provenance to disable default attestation so it will build only desired images: | ||
|
@@ -71,9 +73,15 @@ jobs: | |
build.json | ||
.github/workflows/env.hcl | ||
- name: Set output variables | ||
- name: Set output image names | ||
id: bake_metadata | ||
# bake-action metadata output has gotten too big, so we first write it | ||
# to a file. See https://github.com/aiidalab/aiidalab-docker-stack/issues/491 | ||
run: | | ||
.github/workflows/extract-image-names.sh | tee -a "${GITHUB_OUTPUT}" | awk -F'=' '{print $2}' | jq | ||
env: | ||
BAKE_METADATA: ${{ steps.build-upload.outputs.metadata }} | ||
cat << EOF > bake_metadata.json | ||
${{ steps.build-upload.outputs.metadata }} | ||
EOF | ||
images=$(.github/workflows/extract-image-names.sh bake_metadata.json) | ||
echo "images=${images}" >> "${GITHUB_OUTPUT}" | ||
# Pretty-print for GHA logs | ||
echo "$images" | jq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters