【问题标题】:Updated Node version in GitHub Action not being picked up in PR checksGitHub Action 中的更新节点版本未在 PR 检查中获取
【发布时间】:2022-01-10 03:40:15
【问题描述】:

我在我的私人 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

我在这里缺少什么?这几乎就像是缓存了一些东西。

【问题讨论】:

  • 在 github 操作日志中,您应该看到调用了 setup-node 操作的输入。可以分享一下吗?
  • 这是问题的一部分。在 PR 的“检查”部分中,它永久显示“需要构建 (15.x) - 等待状态报告”,但旁边没有“详细信息”链接来查看相关日志。当我转到 repo 中的“操作”选项卡时,所有工作流似乎都已成功完成。

标签: github github-actions


【解决方案1】:

问题最终是在“设置»分支»合并前要求状态检查通过»合并前要求分支是最新的”中添加的必需状态检查。我删除了该状态检查并重新添加了更新版本,然后该消息从所有打开的 PR 的检查列表中消失了。

【讨论】:

    猜你喜欢
    • 2020-07-26
    • 1970-01-01
    • 2019-10-16
    • 1970-01-01
    • 2021-12-31
    • 2022-08-11
    • 2017-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多