buildah-build
buildah-build copied to clipboard
Update Action to Node 16 and handle set-output deprecation
Description
This PR aims to update this GitHub Action to a recent state.
Its initial aim is to use the "new" Node16 Action runtime as the currently used Node12 runtime is phased out relatively soon (alternative to #107).
It also pins and updates the dependencies used within the Action to their latest versions (ideally this should be handled by something such as Renovate-Bot or Dependabot).
In turn this PR updates to the latest @actions/core
, which in turn fixes the deprecation of the set-output
command.
Finally, this PR updates all Actions used within the workflows of this repositoy and adds an .editorconfig
file to help new contributors.
Related Issue(s)
- Actions can now run in a Node.js 16 runtime
- GitHub Actions: All Actions will begin running on Node16 instead of Node12
- GitHub Actions: Deprecating save-state and set-output commands
Checklist
- [x] This PR includes a documentation change
- [ ] This PR does not need a documentation change
- [x] This PR includes test changes
- [x] This PR's changes are already tested
- [ ] This change is not user-facing
- [ ] This change is a patch change
- [ ] This change is a minor change
- [x] This change is a major (breaking) change*
* it is only major in the sense that it is a major jump from node12 to node16, and GitHub recommending bumping the major version for this
Changes made
- update Action runtime from
node12
tonode16
- update and pin Action dependencies
-
@actions/core
from^1.2.6
to1.10.0
(addresses theset-output
deprecation) -
@actions/exec
from^1.0.4
to1.1.1
-
@actions/io
from^1.0.2
to1.1.2
-
ini
from^2.0.0
to3.0.1
-
- update and pin Action devDependencies
-
@redhat-actions/action-io-generator
from^1.5.0
to1.5.0
-
@redhat-actions/eslint-config
from^1.3.2
to1.3.2
-
@redhat-actions/tsconfig
from^1.1.1
to1.2.0
-
@types/ini
from^1.3.30
to1.3.31
-
@types/node
from^12
to16.11.68
-
@typescript-eslint/eslint-plugin
from^4.28.2
to5.40.1
-
@typescript-eslint/parser
from^4.28.2
to5.40.1
-
@vercel/ncc
from^0.25.1
to0.34.0
-
eslint
from^7.30.0
to8.26.0
-
typescript
from^4.3.5
to4.8.4
-
- fix build error with new TS version
- add
.editorconfig
(based on format present in repo) - update all actions used in this repositories workflows
sorry for not opening an issue before opening this, if it is necessary I can create one after the fact and I won't have any hard feelings if you choose to close this due to it being a requirement.
Regardless, if this is acceptable and you are interested in receiving similar PRs in the other Action repos I would be more than happy to help out. Similarly, if you are interested in configuring Renovate-Bot for dependency updates, then I would be happy to help out.
Why Renovate over Dependabot? Simple, Renovate Bot can group and intelligently update PRs for dependencies where as Dependabot cannot and is rather spamy when it comes to opening and closing bump PRs.
Regarding the ESLint, I can fix them, yet I opted to change as little code as possible within this PR as its scope was solely bumping the dependencies up to recent versions.
@divyansh42, @jduimovich, @tetchel
sorry for the ping on this, but any chance of getting feedback? If I can be of any help or need to alter any of this I would be up for helping out :wink:
Thank you for your work on all of these actions!
re-based on the current master and bumped the devDependencies to their current versions
* I shall fix the ESLint errors once this is deemed acceptable as a PR
Unfortunately it seems this project is kind of dead, but since there was a commit 2 weeks ago there is still some hope. Thanks for the work!
it would be very unfortunate if this action would wind up dead as I see podman
superior to docker (alone for the oci
format support).
I will see to keep this updated and eventually fix the ESLint errors, just so it is an all green CI :smile:
We see that as well, that's why we forked the repo to get some important changes in. We don't really plan to maintain this though, so it would be nice if this here would become more active. Quite embarrassing for an organization like RedHat if you ask me.
okay, I tried to fix all the eslint errors (after the eslint updates), however, I have no idea how this ever worked or how it was intended to work:
https://github.com/redhat-actions/buildah-build/blob/4b8d36793be00cc9ee95b449fee9cd44a7a8c6e9/src/buildah.ts#L125-L131
Error:(125, 9) ESLint: Invalid loop. Its body allows only one iteration. (no-unreachable-loop)
The rest was mostly parameter arrangement "problems" (was not sure on the code style target of the project so adhered to eslint's interpretation)
okay, I tried to fix all the eslint errors (after the eslint updates), however, I have no idea how this ever worked or how it was intended to work:
https://github.com/redhat-actions/buildah-build/blob/4b8d36793be00cc9ee95b449fee9cd44a7a8c6e9/src/buildah.ts#L125-L131
Error:(125, 9) ESLint: Invalid loop. Its body allows only one iteration. (no-unreachable-loop)
The rest was mostly parameter arrangement "problems" (was not sure on the code style target of the project so adhered to eslint's interpretation)
well, fixed it as well as the logic :sweat_smile:
We have created the release for the same.
Should reflect in v2
and v2.11
Nice! Thank you for the heads up (Renovate already started notifying me of the new version on some of my repos :rocket:)