小编Кос*_*чук的帖子

关键字秘密在 github 操作工作流程中不起作用

调用可重用的工作流程:

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
Run Code Online (Sandbox Code Playgroud)

./.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"
Run Code Online (Sandbox Code Playgroud)

错误:工作流程无效。.github/workflows/build_workflow.yml(行:16,列:9):意外值“秘密”

在此输入图像描述

yaml action github github-actions

4
推荐指数
1
解决办法
2349
查看次数

标签 统计

action ×1

github ×1

github-actions ×1

yaml ×1