我的githubacitons yml文件“input”中的错误不是有效的事件名。
名称:随机描述:“随机检查库房”
on:
workflow_dispatch:
inputs:
repo_name:
default: ${{github.event.repository.name}}
required: false
PAT:
description:
default: ${{github.token}}
required: false
runs:
using: "composite"
jobs:
check_out:
steps:
- name: "Checkout github repo"
uses: actions/checkout@v2
with:
repository: ${{inputs.repo_name}}
token: ${{inputs.PAT}}
path: |
basename ${{inputs.repo_name}} | tr -d ".git"错误
Invalid workflow file: .github/workflows/checkout.yml#L1
`inputs` is not a valid event name发布于 2022-03-01 15:03:42
首先,用YML填充物:
on:
workflow_dispatch:
inputs:
repo_name:
default: "Reponame"
required: false
PAT:
description:
default: "TOKEN"
required: false第二,不能在YML定义中使用${{ }变量。
对于默认情况,我建议使用此方法--例如,您可以将其设置为ENV变量,也可以将其直接用作参数--这取决于您需要实现什么:
${{ github.event.inputs.PAT || github.token }}https://stackoverflow.com/questions/71310455
复制相似问题