dtcenter / METplotpy

https://metplotpy.readthedocs.io/en/latest/index.html
Apache License 2.0
12 stars 7 forks source link

Update GitHub actions workflows to switch from node 16 to node 20 #414

Closed lisagoodrich closed 4 months ago

lisagoodrich commented 4 months ago

Describe the Task

As of January 24, 2024, the following warning messages began appearing on the MET GitHub action workflow runs:

[Build Documentation](https://github.com/dtcenter/MET/actions/runs/7642630271/job/20822701483)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v4, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Our call to actions/checkout@v3 triggers this warning message, as do other similar actions. Recommend upgrading action version numbers as needed to move past this warning. Make these change in both the develop and main_v11.1 branches.

Can use the following commands to update:

cd .github/workflows
for file in `ls *.yml`; do 
  cat $file | \
  sed 's%actions/checkout@v3%actions/checkout@v4%g' | \
  sed 's%actions/upload-artifact@v3%actions/upload-artifact@v4%g' | \
  sed 's%actions/download-artifact@v3%actions/download-artifact@v4%g' | \
  sed 's%actions/setup-python@v4%actions/setup-python@v5%g' | \
  sed 's%actions/github-script@v6%actions/github-script@v7%g' > tmp;
  mv tmp $file;
done

To also capture the yaml files run this:

cd .github/workflows
for file in `ls *.yaml`; do 
  cat $file | \
  sed 's%actions/checkout@v3%actions/checkout@v4%g' | \
  sed 's%actions/upload-artifact@v3%actions/upload-artifact@v4%g' | \
  sed 's%actions/download-artifact@v3%actions/download-artifact@v4%g' | \
  sed 's%actions/setup-python@v4%actions/setup-python@v5%g' | \
  sed 's%actions/github-script@v6%actions/github-script@v7%g' > tmp;
  mv tmp $file;
done

Time Estimate

2 hours.

Sub-Issues

This is being done across all MET components. Here is a link to the METplus issue #2796

Relevant Deadlines

Funding Source

2702691 JNT DTC NSF BASE FUN… 2784543 NOAA R2O METp SW2 2799991 Met Office METplus S…

Define the Metadata

Assignee

Labels

Projects and Milestone

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.