GitHub 中的更新节点版本未在 PR 检查中选取
Updated Node version in GitHub Action not being picked up in PR checks
我在我的私有 GitHub 存储库中设置了以下操作:
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.17.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn test
之前,node-version
设置为 [15.x]
,一切都运行良好。自从将所需的 Node 版本更新为 14.17.x
以来,我检查了我的 PR,但从未解决。它说:
build (15.x) Expected — Waiting for status to be reported Required
我在这里错过了什么?就好像缓存了一些东西。
问题最终是在“设置 » 分支 » 要求合并前通过状态检查 » 要求分支在合并前保持最新状态”中添加的必需状态检查。我删除了状态检查并重新添加了更新版本,然后该消息从所有打开的 PR 的检查列表中消失了。
我在我的私有 GitHub 存储库中设置了以下操作:
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.17.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn test
之前,node-version
设置为 [15.x]
,一切都运行良好。自从将所需的 Node 版本更新为 14.17.x
以来,我检查了我的 PR,但从未解决。它说:
build (15.x) Expected — Waiting for status to be reported Required
我在这里错过了什么?就好像缓存了一些东西。
问题最终是在“设置 » 分支 » 要求合并前通过状态检查 » 要求分支在合并前保持最新状态”中添加的必需状态检查。我删除了状态检查并重新添加了更新版本,然后该消息从所有打开的 PR 的检查列表中消失了。