Repository navigation
build-jupyter-cache/publish: pin siblings, scope artifact, harden release (#38) - #44
Merged
Merged
Conversation
…den release (#38) - H8: build-jupyter-cache called siblings via @main, so a pinned build-jupyter-cache transitively ran unreleased main code. Pin them to @v0. NOTE: the issue proposed relative `./` paths, but in a composite action those resolve against the consumer's $GITHUB_WORKSPACE, not this repo (actions/runner#1348), so they'd break consumers — @v0 is the correct fix. - M14: stop duplicating the cached _build into a 30-day artifact on every successful run. Upload the artifact only when a build fails (cache isn't saved then, so it's the sole debugging copy). - M15: write the release tarball/checksum/manifest to $RUNNER_TEMP, outside build-dir, so the growing archive can't recurse into itself. - M16: guard create-release-assets — skip cleanly off-tag, fail fast when github-token is empty (checked via env, not inlined), and gate the upload step on assets actually being created. Closes #38 Co-Authored-By: Claude Opus 4.8 <[email protected]>
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens two composite actions (build-jupyter-cache and publish-gh-pages) to reduce supply-chain risk and unnecessary storage usage, and to make release-asset creation safer and more predictable.
Changes:
- Pin
build-jupyter-cache’s sibling action calls from@mainto the floating release tag@v0. - Upload the
_buildartifact only when a build fails (keeping cache as the single copy on success). - Harden
publish-gh-pagesrelease asset creation: guard on tag + token, write assets to$RUNNER_TEMP, and gate upload on assets actually being created.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| build-jupyter-cache/action.yml | Pins sibling uses: references to @v0 and scopes _build artifact upload to failure-only runs. |
| publish-gh-pages/action.yml | Adds tag/token guards for release assets and writes tar/checksum/manifest outside build-dir; gates upload accordingly. |
| CHANGELOG.md | Documents the pinning, artifact scoping, and release-asset hardening behavior changes. |
The 'Release assets uploaded' summary line still fired whenever create-release-assets was true, but M16 made create-assets skip off-tag. Gate the message on steps.create-assets.outputs.assets-created so it only appears when assets were actually created and uploaded. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #38 (H8, M14, M15, M16).
@v0)The issue (and my original review) proposed switching
build-jupyter-cache's sibling calls to relative./paths. That would have broken every consumer: inside a composite action,uses: ./setup-environmentresolves against the consumer's$GITHUB_WORKSPACE, not this repo — a documented runner limitation (actions/runner#1348, #2101).So instead I pinned the four internal calls from
@main→@v0. This keeps the working full-path reference while fixing the actual risk (a pinned[email protected]no longer transitively runs unreleasedmain). It tracks the floating release tag, consistent with how consumers reference these actions.M14 — artifact only on failure
build-jupyter-cachesaved_buildto the GHA cache and uploaded it as a 30-day artifact on every run (upload-artifactdefaulttrue), duplicating ~150 MB. Now the artifact uploads only when a build fails — exactly when it's useful, since the cache isn't saved on failure. On success the cache is the single copy. (upload-artifact: falsestill suppresses it entirely.)M15 — release tarball can't include itself
publish-gh-pagesrantar -czf "$ARCHIVE_NAME" -C build-dir .in the cwd, so ifbuild-dirwas the cwd/parent the growing archive could recurse into itself. The tarball, checksum, and manifest are now written to$RUNNER_TEMP(outsidebuild-dir); the checksum still references just the archive filename.M16 — guard
create-release-assetsPreviously no tag/token guard, so enabling it without a tag or token failed confusingly mid-upload. Now it:
assets-created=false);github-tokenis empty (checked via an env var, not inlined into the script);Verification
@v0, no@mainremaining.Closes #38
🤖 Generated with Claude Code