How do I update github actions to Node.js 20?

I got a complaint from github about Node.jl 16 actions. It tells me

Please update the following actions to use Node.js 20: actions/checkout@v3, julia-actions/setup-julia@latest. 

and points me to a link that does not help at all. Does anyone out there
know what to do.

The offending lines are in a docs.yml file

      - uses: actions/checkout@v3
      - uses: julia-actions/setup-julia@latest
        with:
          version: ${{ matrix.julia-version }}

Thanks in advance.

1 Like

You should be able to just update the version of the first action to actions/checkout@v4. The other one requires update to node20 by ranocha · Pull Request #209 · julia-actions/setup-julia · GitHub

To get updates like the first one, you should consider adding a Dependabot configuration to your repository as in Trixi.jl/.github/dependabot.yml at main · trixi-framework/Trixi.jl · GitHub

1 Like

'preciate it

Even better, add the depedabot file to the .github repo of the organisation, so that it applies to all repositories within the org, instead of scattering dozens of identicalt files across all repos (and have fun later updating them).

I put the dependabot.yml file in .github and it sent me two PRs that I did not understand. What are those PRs for?

Can you provide a link to the repo in question?

I would expect that those PRs update the versions of some GitHub actions like from actions/checkout@v3 to actions/checkout@v4. But I would need to have a lonk to the PRs to tell you more

The repo is here. I deleted the branches with the PRs and did the updates manually. github is not complaining any more, so I think I am done.

I left the dependabot.yml in .github and will see if I get more PRs.

Thanks to all of you for the help.

I’m dealing with the same problem, and not getting anywhere. I have to confess to having no understanding of GitHub actions. I thought I could maybe solve my problem by specifying node-version [20], but clearly I’m wrong. Can anyone help? These lines are in CI.yml:

jobs:
  test:
    name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        node-version: [20]
        version:
          - '1'
          - 'nightly'
        os:
          - ubuntu-latest
        arch:
          - x64
    steps:
      - uses: actions/checkout@v4
      - uses: julia-actions/setup-julia@v1
        with:
          version: ${{ matrix.version }}
          arch: ${{ matrix.arch }}
      - uses: julia-actions/cache@v1
      - uses: julia-actions/julia-buildpkg@v1
      - uses: julia-actions/julia-runtest@v1

I got things to work by copying from other packages. My stuff in

/.github/workflows/

from SIAMFANLEquations.jl
is doing the job for me. Feel free to use my ci.yml and anything else in there.

Be aware that using other peoples’ .yml files, which I do all the time, can bite you. Take this issue, please.

Thanks a lot. It still isn’t working, and I’m wondering if the problem doesn’t lie in my code. The errors I get back refer to these entries:

julia-actions/setup-julia@latest
actions/cache@4d4ae6ae148a43d0fd1eda1800170683e9882738
pyTooling/Actions/with-post-step@adef08d3bdef092282614f3b683897cefae82ee3

But the last two I don’t even mention. Could it be that the last two are referenced by the first?

You have exceeded my skill level. I’m stumped.

:joy: Well, the skill level of my problem, anyway - I don’t think I can claim that level for myself! Thanks for your time.

Can you please explain what problem you’re trying to solve exactly?

I’ll try, but as I say, I’m a little unsure whether I’m understanding correctly. I wrote an updat to my julia package a couple of days ago, and the nightly ubuntu-latest test run failed. The message is currently:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: julia-actions/setup-julia@latest, actions/cache@4d4ae6ae148a43d0fd1eda1800170683e9882738, pyTooling/Actions/with-post-step@adef08d3bdef092282614f3b683897cefae82ee3.

This message is the response to my latest changes to CI.yml, which currently reads:

jobs:
  test:
    name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        version:
          - '1'
          - 'nightly'
        os:
          - ubuntu-latest
        arch:
          - x64
    steps:
      - uses: actions/checkout@v4
      - uses: julia-actions/setup-julia@latest
        with:
          version: ${{ matrix.version }}
          arch: ${{ matrix.arch }}
      - uses: julia-actions/cache@v1
      - uses: julia-actions/julia-buildpkg@latest
      - uses: julia-actions/julia-runtest@latest

At the moment I’ve come to a standstill - can you help?
(Btw, I’m driving from Germany to Britain over the next two days, so my responses may be slow)

So, to be clear, unless you’re creating a github actions workflow yourself which uses the Node runtime (and you aren’t) you don’t control the Node runtime, each step is using whatever Node runtime was chosen by the external workflows you’re using (or their own dependencies). The warnings you shared are because of

So you can’t really do much about it until those issues are addressed.

1 Like

OK, thank you. I’m unsure how exactly this affects me as a package owner. Can I just continue life as usual, even though my package fails all the tests? That seems a little risky, but my students are starting a new semester and need my changes by Friday.

Wait, what tests are failing? Above we’ve been talking about warnings about the node version used by github actions workflows, which, at the moment, is not compromising your ability to run CI test. If your tests are failing you probably want to fix that, but it’s unrelated to the Node version.

1 Like

I’m confused - I thought that was what we’d been talking about. After I submit a change to my code, normally the package server performs three runs: julia 1, ubuntu-latest and ubuntu-latest-nightly. The last two of these are failing after like 17 minutes with the messages I quoted above.

You thought that, no one says that :slightly_smiling_face: Also, I don’t think you shared any link to your repository, we can’t possibly guess what’s happening for you.

Those are warnings, unlikely to be the actual culprit of your failures. If you seek help, you may want to start a new thread with detailed information (and links…) about your errors.