redhat-actions / buildah-build

GitHub Action to use 'buildah' to build a container image.
https://github.com/marketplace/actions/buildah-build
MIT License
136 stars 35 forks source link

Update Action to Node 16 and handle set-output deprecation #109

Closed k3rnelpan1c-dev closed 1 year ago

k3rnelpan1c-dev commented 1 year ago

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

* 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

k3rnelpan1c-dev commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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

der-eismann commented 1 year ago

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!

k3rnelpan1c-dev commented 1 year ago

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:

der-eismann commented 1 year ago

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.

k3rnelpan1c-dev commented 1 year ago

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 commented 1 year ago

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:

divyansh42 commented 1 year ago

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

k3rnelpan1c-dev commented 1 year ago

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