You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#10. Biggest compatibility risk in the modernization plan,
called out in the #15 tracker as needing a provider-repo dogfood
before landing.
## Bootstrap rewrite
The EC2 user-data now:
- set -euo pipefail throughout — a silent useradd / tar / sha256sum
failure kills the bootstrap instead of proceeding to a broken
./run.sh.
- Creates a dedicated 'runner' user (idempotent — skipped if it
already exists, so re-runs from a crash-loop don't explode).
- Drops to that user via 'sudo -u runner -H bash <<RUNNER_BOOTSTRAP'
for every subsequent step. The old 'export RUNNER_ALLOW_RUNASROOT=1'
escape hatch is gone.
- Fetches the runner tarball and SHA-256-verifies it against
actions/runner's published '.sha256' sidecar before extraction.
Same defense-in-depth pattern the provider repo uses for Go and
Terraform downloads (namecheap/terraform-provider-namecheap#160).
- Passes '--ephemeral --unattended --disableupdate' to config.sh.
GitHub auto-deregisters the runner after one job — the existing
removeRunner() API call in src/gh.js becomes belt-and-braces rather
than the primary deregister path. --disableupdate keeps the runner
binary stable for the short-lived ephemeral session.
## New 'runner-version' input
Optional, defaults to '2.333.1' (the version this PR is tested
against). Consumers can override without waiting for a new action
release — useful when GitHub gates a JS action on a newer node
runtime and we need to move fast.
src/config.js reads it with a default fallback so old callers that
don't set it continue to work.
## CI adjustment
The existing verify-runner-url job greps the literal version string
out of the source to HEAD-check the release asset. With the version
now parameterized, the literal lives in action.yml's 'default:',
so the extractor is rewritten to read it from there.
## Tests
tests/config.test.js adds two cases:
- defaults to 2.333.1 when runner-version input is unset
- honors an explicit override
Full suite: 23 tests pass across utils + config.
## Consumer impact (terraform-provider-namecheap acctest)
- make testacc is 'go test' — no root required.
- All setup steps (curl Go / Terraform, extract tarballs, write
go-env.sh) write to $GITHUB_WORKSPACE which is writable by any
runner user, not just root.
- actions/checkout@v6 writes to the workspace, no root.
- The workspace directory structure is unchanged beyond its absolute
path (/home/runner/actions-runner/_work/... instead of
/actions-runner/_work/...). GITHUB_WORKSPACE, HOME, and relative
paths all resolve the same way.
The dogfood SHA-pin rotation will be opened on the provider repo
after this merges, mirroring the pattern from machulav#158 → machulav#159.
Signed-off-by: yuriyryabikov <22548029+kurok@users.noreply.github.com>
0 commit comments