Skip to content

Commit

Permalink
Set ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION for container jobs
Browse files Browse the repository at this point in the history
Node 20 isn't supported in containers and GitHub actions forces actions
to use Node 20 even when the action is specified to use Node 16.
See https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default

This causes e.g. `actions/checkout@v3` to fail since that change.
A workaround is to set `$ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION` to
prevent this change (for now).
  • Loading branch information
Flamefire committed Jul 4, 2024
1 parent 714e120 commit 7287dcd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ jobs:
if [[ "${{matrix.container}}" == "ubuntu:16.04" ]] || [[ "${{matrix.container}}" == "ubuntu:18.04" ]]; then
# Ubuntu 16/18 can't run Node 20, so stick to older actions: https://github.com/actions/checkout/issues/1590
echo "GHA_USE_NODE_20=false" >> $GITHUB_ENV
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
else
echo "GHA_USE_NODE_20=true" >> $GITHUB_ENV
fi
Expand Down

0 comments on commit 7287dcd

Please sign in to comment.