Skip to content

Commit

Permalink
Merge pull request #33 from umccr/update/update-set-output-legacy-in-…
Browse files Browse the repository at this point in the history
…python-code

Update setting output in python code
  • Loading branch information
alexiswl authored Feb 2, 2024
2 parents a30bf01 + af77588 commit 134292a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/scripts/get-images-to-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,13 @@ def main():

# Print out image_tags_to_build as a json string that GitHub Actions will read
image_tags_as_json_string = json.dumps(images_tags_to_build).replace(", ", ",")
print(f"::set-output name=image_tags_to_build::{image_tags_as_json_string}")

if environ.get("GITHUB_OUTPUT", None) is None:
print(f"::set-output name=image_tags_to_build::{image_tags_as_json_string}")
else:
# Write things the 'new way' for GitHub Actions
with open(environ.get("GITHUB_OUTPUT"), 'a') as github_output_h:
github_output_h.write(f"image_tags_to_build={image_tags_as_json_string}\n")

if __name__ == "__main__":
main()
4 changes: 2 additions & 2 deletions .github/workflows/scatter_build_and_push_to_ghcrio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ jobs:
echo "platforms_as_str=${platforms_str}" >> "${GITHUB_OUTPUT}"
# Use qemu to perform multiplatform builds
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
# Use docker buildx to build multi-platform containers
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
use: true
install: true
Expand Down

0 comments on commit 134292a

Please sign in to comment.