相关疑难解决方法(0)

如何在 Github 中指定 actions/setup-node 的路径

注意:我已经看过这两个:

如何在 github 操作中的特定文件夹中运行 CI 步骤
如何在 Github 操作中指定节点的路径?

但我仍然无法让它工作,这就是为什么我问如何设置命令的工作目录uses。我的 yaml 当前如下所示:

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
  push:
    branches: [ main, Create-.yml-file ]
  pull_request:
    branches: [ main, Create-.yml-file ]

jobs:
  javatest:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v2
      with:
        java-version: '16'
        distribution: 'adopt'
    - name: Cache Maven packages
      uses: actions/cache@v2
      with:
        path: ~/.m2
        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} …
Run Code Online (Sandbox Code Playgroud)

yaml node.js github-actions

22
推荐指数
2
解决办法
2万
查看次数

如何在 github 操作中的特定文件夹中运行我的 CI 步骤

我有golang一个react客户的回购。我想为我的客户端使用 github 操作设置 CI。React 客户端client位于工作区中的文件夹内。我编写了以下工作流程

name : Node.js CI

on: [push, pull_request]

jobs:

  build:
    name: build
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v2 
      with:
        path: client
    - name: Set up Node.js
      uses: actions/setup-node@v1
      with:
        node-version: 12.x

    - run: yarn install

    - run: yarn build
Run Code Online (Sandbox Code Playgroud)

但是在提交时显示以下错误

 Run yarn build1s
##[error]Process completed with exit code 1.
Run yarn build
yarn run v1.21.1
error Couldn't find a package.json file in "/home/runner/work/evential/evential"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this …
Run Code Online (Sandbox Code Playgroud)

node.js github-actions

6
推荐指数
2
解决办法
2262
查看次数

标签 统计

github-actions ×2

node.js ×2

yaml ×1