Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.4.1 still gives Node16 warning #22

Closed
richb-hanover opened this issue Jun 9, 2024 · 18 comments
Closed

Version 1.4.1 still gives Node16 warning #22

richb-hanover opened this issue Jun 9, 2024 · 18 comments

Comments

@richb-hanover
Copy link

I'm feeling dopey: I changed a project (https://github.com/richb-hanover/prql/blob/main/.github/workflows/nightly.yaml) to use rustsec/[email protected]. I did this to get away from the "Node16" warning from my previous action.

But I'm still getting this warning:

cargo-audit
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: rustsec/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

What am I missing? Thanks

PS @clechasseur - any thoughts on this? I see you made the PR to update to Node20... Thanks again.

@clechasseur
Copy link

It seems my PR was merged but no new releases were published - they'd need to do a new release.

@richb-hanover
Copy link
Author

That problem bit me as well. I couldn't figure out how to update a Github Action of my own...

Would you give me a hint about how to "publish a new release" on a Github Action? Many thanks

@richb-hanover
Copy link
Author

richb-hanover commented Jun 9, 2024

I think I answered my own question: Is this the documentation? https://docs.github.com/en/actions/creating-actions/publishing-actions-in-github-marketplace

@richb-hanover
Copy link
Author

Would it be possible to publish the latest action? Many thanks.

@tarcieri
Copy link
Member

Sorry, yes I need to do that and I'm not really familiar with how

@richb-hanover
Copy link
Author

I don't know either. So I asked a question at: https://github.com/orgs/community/discussions/129097

I'll let you know if I hear something...

@richb-hanover
Copy link
Author

Here's what I know: I got an answer about publishing an update at https://github.com/orgs/community/discussions/129097#discussioncomment-9821029

The answer for my repo is that there's a .github/workflow/ci.yml file that runs when there's a commit/push. (My repo is currently failing because of ancient npm depencency conflicts.)

I don't see any problems for the Actions in this repo. Perhaps @clechasseur could weigh in - he created the PR for Node20... Thanks!

@clechasseur
Copy link

I don't see any problems for the Actions in this repo. Perhaps @clechasseur could weigh in - he created the PR for Node20... Thanks!

To do a new release, this is what I suggest:

  1. Checkout latest main branch
  2. Update the version number in package.json
  3. Run npm install
  4. Run npm run refresh; this should update the file in the dist/ folder
  5. Commit all changes and push them
  6. Create a new release the usual way (perhaps a version 2.0, since changing the Node version is technically a breaking change)

As an aside: before releasing a new version, I suggest merging my latest PR (see #23); it fixes a high-severity vulnerability in the braces library which is a dependency.

@azriel91
Copy link

azriel91 commented Sep 1, 2024

@tarcieri Heya, would you be able to find time to do the above?

I'm also curious to find out if my repos would automatically pick a compatible version up -- I updated a lot of them (by hand 🫠) to depend on 1.4.1, and hopefully they just pick up a 1.4.2 without needing to be told

@tarcieri
Copy link
Member

I'll see if I can look soon

@tarcieri
Copy link
Member

Failed on npm install:

npm error code E401
npm error 401 Unauthorized - GET https://npm.pkg.github.com/download/@clechasseur/rs-actions-core/3.0.5/b35ae1eb71c59dd75c7db9ecccba1bd7f3a2fc99 - authentication token not provided

(I've done npm login, FWIW)

npm v10.7.0

@clechasseur
Copy link

Failed on npm install:

npm error code E401
npm error 401 Unauthorized - GET https://npm.pkg.github.com/download/@clechasseur/rs-actions-core/3.0.5/b35ae1eb71c59dd75c7db9ecccba1bd7f3a2fc99 - authentication token not provided

(I've done npm login, FWIW)

npm v10.7.0

Strange, as the package should be public. Did you authenticate with just npm login? The instructions to use the GitHub package registry mention that you need to do this:

npm login --scope=@NAMESPACE --auth-type=legacy --registry=https://npm.pkg.github.com

Here, @NAMESPACE should be @clechasseur.

I thought you didn't need this to simply read packages, however...

@tarcieri
Copy link
Member

I wasn't able to login at all with that. I attempted to use my GitHub credentials, and got the following:

npm error code E403
npm error 403 403 Forbidden - PUT https://npm.pkg.github.com/-/user/org.couchdb.user:tarcieri - Permission denied
npm error 403 In most cases, you or one of your dependencies are requesting
npm error 403 a package version that is forbidden by your security policy, or
npm error 403 on a server you do not have access to.

@tarcieri
Copy link
Member

tarcieri commented Sep 23, 2024

Okay, the issue with the above is the "password" is actually a personal access token. I was able to login successfully but:

npm error code E403
npm error 403 403 Forbidden - GET https://npm.pkg.github.com/download/@clechasseur/rs-actions-core/3.0.5/b35ae1eb71c59dd75c7db9ecccba1bd7f3a2fc99 - Permission permission_denied: The token provided does not match expected scopes.

Right back where we started. Does npm install work for anyone else? Is there an issue with that particular dependency for some reason?

Edit: okay, this was permissions on the token. Ugh, this is annoying as hell.

@tarcieri
Copy link
Member

Okay, I attempted to publish a new release here: https://github.com/rustsec/audit-check/releases/tag/v2.0.0

@astraw
Copy link

astraw commented Sep 23, 2024

@tarcieri thanks for working on this. It's not working for us, apparently due to a lacking Cargo.lock file.

2024-09-23T14:31:06.5076364Z ##[group]Calling cargo-audit (JSON output)
2024-09-23T14:31:06.5089344Z [command]/home/runner/.cargo/bin/cargo audit --json --file ./Cargo.lock
2024-09-23T14:31:09.0744703Z error: not found: Couldn't load ./Cargo.lock
2024-09-23T14:31:09.0745675Z Caused by:
2024-09-23T14:31:09.0746708Z   -> I/O operation failed: I/O operation failed: entity not found
2024-09-23T14:31:09.0775439Z 
2024-09-23T14:31:09.0776822Z ##[endgroup]
2024-09-23T14:31:09.0804531Z ##[error]Unexpected end of JSON input

(Full output here.)

Is it now required to have Cargo.lock? We didn't use to have one and older releases of audit-check worked OK.

@SamRodri
Copy link

Looks like Cargo.lock gen was removed in #20. I worked around this by adding a - run: cargo generate-lockfile step.

@astraw
Copy link

astraw commented Sep 23, 2024

Yes, that did it, thanks.

I think this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants