将您的操作更新为在GitHub上运行在Node 16而不是Node 12。

huangapple go评论75阅读模式
英文:

Update your actions to run on Node 16 instead of Node 12 on GitHub

问题

While I've seen it claimed that this question was answered elsewhere, it was not. 我看到有人声称这个问题在其他地方得到了解答,但实际上并没有。

I am getting a complaint about using Node 12 instead of Node 16 in this code: 我收到了有关在此代码中使用Node 12而不是Node 16的投诉:

There is no documentation that says exactly what is the difference between Node 12 and Node 16 (at least not in the provided links.) 没有文档明确说明Node 12和Node 16之间的区别(至少在提供的链接中没有)。

The supposed answer on StackExchange (https://stackoverflow.com/questions/75061837/github-actions-node-js-12-actions-are-deprecated-although-i-upgraded-everyt) says something about run vs runs. StackExchange上的所谓答案(https://stackoverflow.com/questions/75061837/github-actions-node-js-12-actions-are-deprecated-although-i-upgraded-everyt)提到了runruns之间的差异。

Do I just change the word run to runs in the last command? 我只需将最后一个命令中的单词run更改为runs吗?

英文:

While I've seen it claimed that this question was answered elsewhere, it was not. I am getting a complaint about using Node 12 instead of Node 16 in this code:

There is no documentation that says exactly what is the difference between Node 12 and Node 16 (at least not in the provided links.) The

  lint-flake8:
    runs-on: ubuntu-latest
    name: flake8
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.8]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{matrix.python-version}}
      uses: actions/setup-python@v2
      with:
        python-version: ${{matrix.python-version}}
    - name: flake8
      continue-on-error: false
      run: |
        pip install flake8
        flake8 pyuvm tests/pytests

The supposed answer on StackExchange (https://stackoverflow.com/questions/75061837/github-actions-node-js-12-actions-are-deprecated-although-i-upgraded-everyt) says something about run vs runs.

Do I just change the word run to runs in the last command?

答案1

得分: 4

You probably need to upgrade the actions to the latest version:

- uses: actions/checkout@v3
- uses: actions/setup-python@v4

Both now have a much newer version.

The easiest way to stay current is to enable Dependabot for GitHub Actions.

将您的操作更新为在GitHub上运行在Node 16而不是Node 12。

Then add a file to your repo to enable Dependabot (/.github/dependabot.yml) for actions:

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"

You then get updates that keep you up to date automatically:

将您的操作更新为在GitHub上运行在Node 16而不是Node 12。

英文:

You probably need to upgrade the actions to the latest version:

- uses: actions/checkout@v3
- uses: actions/setup-python@v4

Both now have a much newer version.

The easiest way to stay current is to enable Dependabot for GitHub Actions.

将您的操作更新为在GitHub上运行在Node 16而不是Node 12。

Then add a file to your repo to enable dependabot (/.github/dependabot.yml) for actions:

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/" 
    schedule:
      interval: "weekly"

You then get updates that keep you up to date automatically:

将您的操作更新为在GitHub上运行在Node 16而不是Node 12。

huangapple
  • 本文由 发表于 2023年4月20日 00:21:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76056803.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定