buildah-build icon indicating copy to clipboard operation
buildah-build copied to clipboard

Update Action to Node 16 and handle set-output deprecation

Open k3rnelpan1c-dev opened this issue 2 years ago • 2 comments

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)

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 to node16
  • update and pin Action dependencies
    • @actions/core from ^1.2.6 to 1.10.0 (addresses the set-output deprecation)
    • @actions/exec from ^1.0.4 to 1.1.1
    • @actions/io from ^1.0.2 to 1.1.2
    • ini from ^2.0.0 to 3.0.1
  • update and pin Action devDependencies
    • @redhat-actions/action-io-generator from ^1.5.0 to 1.5.0
    • @redhat-actions/eslint-config from ^1.3.2 to 1.3.2
    • @redhat-actions/tsconfig from ^1.1.1 to 1.2.0
    • @types/ini from ^1.3.30 to 1.3.31
    • @types/node from ^12 to 16.11.68
    • @typescript-eslint/eslint-plugin from ^4.28.2 to 5.40.1
    • @typescript-eslint/parser from ^4.28.2 to 5.40.1
    • @vercel/ncc from ^0.25.1 to 0.34.0
    • eslint from ^7.30.0 to 8.26.0
    • typescript from ^4.3.5 to 4.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

k3rnelpan1c-dev avatar Oct 22 '22 16:10 k3rnelpan1c-dev

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.

k3rnelpan1c-dev avatar Oct 22 '22 16:10 k3rnelpan1c-dev

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.

k3rnelpan1c-dev avatar Oct 22 '22 17:10 k3rnelpan1c-dev

@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!

k3rnelpan1c-dev avatar Nov 20 '22 16:11 k3rnelpan1c-dev

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

k3rnelpan1c-dev avatar Nov 30 '22 18:11 k3rnelpan1c-dev

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!

der-eismann avatar Dec 05 '22 15:12 der-eismann

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:

k3rnelpan1c-dev avatar Dec 07 '22 22:12 k3rnelpan1c-dev

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.

der-eismann avatar Dec 08 '22 09:12 der-eismann

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)

k3rnelpan1c-dev avatar Dec 08 '22 22:12 k3rnelpan1c-dev

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:

k3rnelpan1c-dev avatar Dec 11 '22 18:12 k3rnelpan1c-dev

We have created the release for the same. Should reflect in v2 and v2.11

divyansh42 avatar Dec 29 '22 13:12 divyansh42

Nice! Thank you for the heads up (Renovate already started notifying me of the new version on some of my repos :rocket:)

k3rnelpan1c-dev avatar Dec 29 '22 14:12 k3rnelpan1c-dev