fix: write outputs to GITHUB_OUTPUT file instead of ::set-output#5
Merged
kurok merged 1 commit intofeat/al2023-supportfrom Apr 20, 2026
Merged
Conversation
The bundled @actions/core v1.2.6 still emits the deprecated '::set-output name=X::Y' workflow command, which GitHub has warned about since 2022-10 and has announced will be disabled outright: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. Two viable fixes: - Bump @actions/core to >= 1.10.0 (the version that switched to GITHUB_OUTPUT internally). Tried; transitive deps pull modern JS (private class fields) that @vercel/ncc 0.25.1 can't parse, which would force a separate ncc major bump with much larger dist churn. - Bypass core.setOutput entirely and write directly to the GITHUB_OUTPUT file. Modern runners always set that env var. Going with the second option. 11-line change in src/index.js with an equivalent 11-line diff in the rebuilt dist/index.js. No dependency updates; ncc rebuild is reproducible. Fallback path through core.setOutput() retained for the unlikely case that GITHUB_OUTPUT isn't set (pre-2022 self-hosted runner or local dry-run). Output values (label, ec2InstanceId) never contain newlines, so the plain 'key=value\n' format is safe. Signed-off-by: yuriyryabikov <22548029+kurok@users.noreply.github.com>
This was referenced Apr 20, 2026
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.
Summary
Stop emitting the deprecated
::set-output name=X::Yworkflow command. Write thelabelandec2-instance-idoutputs directly to theGITHUB_OUTPUTenvironment file instead.Eleven-line change in
src/index.js, identical eleven-line diff in the rebuiltdist/index.js. No dependency updates.Why
GitHub is forcing the issue:
The warning was surfacing on every consumer's Actions page (example).
Why not bump
@actions/coreOriginally tried bumping
@actions/corefrom^1.2.6to1.10.1+(the version that writes to$GITHUB_OUTPUTinternally). The dep chain now pullsundici, which uses modern-JS private class fields (#caches).@vercel/ncc 0.25.1(the version pinned here since 2021) is webpack-4-era and refuses to parse them:Fixing the parse error requires a major
@vercel/nccbump (to 0.38.x / webpack 5), which rewrites the whole bundle — far bigger blast radius than this deprecation warrants. This PR stays within the existing toolchain.What changed
The
core.setOutputfallback is kept for defense in depth — a pre-2022 runner withoutGITHUB_OUTPUTstill works, just with the deprecation warning intact. All modern runners (v2.297+) setGITHUB_OUTPUT, so production CI takes the quiet path.Safety
Output values come from:
config.generateUniqueLabel()— auuid.v4()string, no newlinesec2InstanceId— AWSi-…identifier, alphanumeric onlyPlain
key=value\nis safe for both. No heredoc encoding needed.Verification
verify-dist(added in feat: bump actions/runner to v2.333.1 for node24 support #3) will confirm the rebuilt bundle matches the committed dist.verify-runner-urlstays green (no URL change).lintstays green (no new ESLint-flagged patterns).namecheap/terraform-provider-namecheapwill need a 2-line bump mirroring Bump word-wrap from 1.2.3 to 1.2.4 machulav/ec2-github-runner#159.Stacking note
This sits on top of #4 (
using: node12 → node24). Expected merge order is #4 first, then this one; the two don't interact.