tobozo / YAMLDuino

YAML <=> JSON converter for ESP32, ESP8266, RP2040 and possibly other devices
Other
42 stars 2 forks source link

Update `actions/checkout` in GitHub Actions workflows to 3.x #10

Closed per1234 closed 2 years ago

per1234 commented 2 years ago

A new major version series of the actions/checkout GitHub Action action was started in March 2022:

https://github.com/actions/checkout/releases/tag/v3.0.0

This project's GitHub Actions workflows previously used the v2 major version ref when specifying the version of the action to use, resulting in the workflows not having access to the advancements made to the action in the 3.x series.

One of these advancements is the update from using Node.js 12.x to Node.js 16.x for the action on the GitHub Actions runner. GitHub has deprecated the use of Node.js 12.x in actions:

https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/

In order to encourage the migration of actions and workflows, GitHub added warnings to the workflow run summary page of every GitHub actions workflow that uses a Node.js 12.x-based action:

https://github.com/ArminJo/arduino-test-compile/issues/32#issuecomment-1288151164

Updating the action resolves the warnings. I have carefully evaluated the changes which caused the major version bump in the action and found that they do not have any impact on the functionality of this project's workflows.

tobozo commented 2 years ago

thanks ! I'm already editing that workflow so I won't merge this PR but I've upgraded the version.

no more warnings indeed

tobozo commented 2 years ago

wow this affected more workflows than I thought

a few other actions were affected too such as actions/cache, actions/setup-python, is that related to the incoming deprecation of ::set-output and ::set-env in workflows?

per1234 commented 2 years ago

I don't think there is any connection between the deprecation of Node.js 12.x action and the deprecation of those workflow commands.

Both of these things also required the maintainers of GitHub Actions actions to make changes in their actions, new releases of the actions, and then possibly for the action's users to bump the version in their workflows to the one containing the change. The Node.js bump was treated as a breaking change by the action developers, whereas the @actions/core package bump is not. So for those using a major version ref in the workflow (e.g., v2), as long as the version with the package bump is in the same major version series as the ref, the workflow maintainer does not need to take any action related to the actions. Of course the workflow maintainer will need to migrate any direct use of the workflow commands in their workflow to the new "environment files" system.