-
Notifications
You must be signed in to change notification settings - Fork 61k
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
chore: use node16
for actions
#24540
Conversation
There are some yaml and markdown file actions that still using `node12`, update these actions to `node16`.
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
@WaterLemons2k Thank you for opening a PR and linking it to your issue! ✨ I'll get this triaged for review! ⚡ |
@WaterLemons2k - thanks for improving our docs ✨ I have asked the relevant team to check that these changes are correct, and I am wondering if we should use a variable for all these instances. |
VerificationUsing a little bit of bash scripting and the handy gh cli: #!/bin/bash
set -e
CHANGED_ACTIONS="$(git --no-pager diff main...HEAD --diff-filter=M | grep -oE '^[+]\s*[-]*\s*uses:\s*?([A-Za-z\-]*)/([A-Za-z0-9\-]*)@([0-9a-z.]*)' | grep -oE '([A-Za-z\-]*)/([A-Za-z0-9\-]*)@([0-9a-z.]*)')"
# Create a markdown table
echo "| Verified | Action | Version | SHA | Commit Message | URL | Actions YAML |"
echo "| -------- | ------ | ------- | --- | -------------- | --- | ------------ |"
# Loop over the changed actions
for ACTION in $CHANGED_ACTIONS; do
# Get the action name and version
ACTION_NAME="$(echo $ACTION | cut -d'@' -f1)"
ACTION_VERSION="$(echo $ACTION | cut -d'@' -f2)"
# Get the SHA, commit message (first line only!) and URL for the action version
ACTION_METADATA=$(gh api -X GET "repos/$ACTION_NAME/commits/$ACTION_VERSION" | jq -r '.sha + " | " + (.commit.message | split("\n")[0]) + " | " + .html_url')
ACTIONS_YAML="https://raw.githubusercontent.com/$ACTION_NAME/$ACTION_VERSION/action.yml"
RUNS_USING="$(curl -s $ACTIONS_YAML | yq '.runs.using')"
VERIFIED=""
if [ "$RUNS_USING" == "node16" ]; then
VERIFIED="✅"
fi
echo "| $VERIFIED | $ACTION_NAME | $ACTION_VERSION | $ACTION_METADATA | $ACTIONS_YAML |"
done We get this:
Edit: I updated the script to check and parse the value of the |
These commits didn't show the runtime change from node12 to node16 because some actions already have commits using node16 being used (e.g. |
Yep thank you @WaterLemons2k 🙏 my comment was for my team so that we make sure to do another manual verification for those. Also, since we're updating the versions, we might as well upgrade to the latest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼 from @github/docs-content-strategy for the changes in contributing/
April 20th
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed this on behalf of @github/c2c-actions-runtime - the new SHAs are ✅
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Why:
There're some actions that still using
node12
, update these actions tonode16
.Closes #24539
What's being changed (if available, include any code snippets, screenshots, or gifs):
Any actions changed in this PR will use
node16
.Check off the following: