调用可重复使用的工作流程:
./.github/workflows/build_job 文件夹包含 action.yml 文件:
错误:工作流程无效。.github/workflows/build_workflow.yml(第16行,第9列):未预期的值“secrets”。
name: Build only workflow
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/build_job
with:
TARGET: lol
secrets: inherit
./.github/workflows/build_job 文件夹包含 action.yml 文件:
name: Build job
on:
workflow_call:
inputs:
TARGET:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{secrets.SSH_KEY}}
- run: echo "hello"
错误:工作流程无效。.github/workflows/build_workflow.yml(第16行,第9列):未预期的值“secrets”。