-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
checkout@v4 doesnt work inside container action #1474
Comments
The Docker image for
|
@tvalenta |
Ubuntu 20.04 is not quite ready for v4 which uses a node version that is too new for the system. [1] actions/checkout#1474
Ubuntu 20.04 is not quite ready for v4 which uses a node version that is too new for the system. [1] actions/checkout#1474
With changes from GitHub [finally deprecating](actions/checkout#1474) [node16 based runners](https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/) (which the checkout@v3 action uses) we need to make changes to support this. To do this, there are two changes. First we remove the python 3.6 check as with the changes in pydantic v2 that will be merged soon, we will be removing this check there, so we can more easily remove it now so that future PRs are cleaner and it is clear why some changes have been made. Second, node16 is the default on some of our self-hosted runners. To work around tests failing on these, we [set the GitHub env var to override this check](https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/). Other relevant links: actions/checkout#1474 https://github.com/easybuilders/easybuild-framework/pull/4574/files actions/checkout#1809 actions/runner#3373 actions/checkout#1809
…rosoft#5756) With changes from GitHub [finally deprecating](actions/checkout#1474) [node16 based runners](https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/) (which the checkout@v3 action uses) we need to make changes to support this. To do this, there are two changes. First we remove the python 3.6 check as with the changes in pydantic v2 that will be merged soon, we will be removing this check there, so we can more easily remove it now so that future PRs are cleaner and it is clear why some changes have been made. Second, node16 is the default on some of our self-hosted runners. To work around tests failing on these, we [set the GitHub env var to override this check](https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/). Other relevant links: actions/checkout#1474 https://github.com/easybuilders/easybuild-framework/pull/4574/files actions/checkout#1809 actions/runner#3373 actions/checkout#1809
I worked around this by mapping container:
image: ubuntu:16.04 # expanded security maintenance until 04/02/2026, according to https://endoflife.date/ubuntu
volumes:
# override /__e/node20 because GitHub Actions uses a version that requires too-recent glibc
# see "Install node.js for GitHub Actions" below
- /tmp:/__e/node20 and then steps:
- name: Install node.js for GitHub Actions
run: |
apt-get install -y curl ca-certificates &&
# Install a Node.js version that works in older Ubuntu containers (read: does not require very recent glibc)
NODE_VERSION=v20.18.1 &&
NODE_TAR_FILE=node-$NODE_VERSION-linux-x64-glibc-217.tar.gz &&
NODE_URL=https://unofficial-builds.nodejs.org/download/release/$NODE_VERSION/$NODE_TAR_FILE &&
curl -Lo /tmp/$NODE_TAR_FILE $NODE_URL &&
tar -C /__e/node20 -x --strip-components=1 -f /tmp/$NODE_TAR_FILE To be completely honest, I do not love that this work-around is needed. It would be ideal if GitHub Actions came with a statically-linked node.js version. At the same time I have little illusions left about the chances that this work-around will be made obsolete. |
v4 doesnt work, but it's working for v3.
Error message:
The text was updated successfully, but these errors were encountered: