【发布时间】:2022-06-17 22:00:02
【问题描述】:
我在一个名为 terraform-do-database 的仓库中有这个工作流程,我正在尝试使用来自公共仓库 foo/git-workflows/.github/workflows/tag_validation.yaml@master 的可重用工作流程
name: Tag Validation
on:
pull_request:
branches: [master]
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
tag_check:
uses: foo/git-workflows/.github/workflows/tag_validation.yaml@master
这是来自公共 git-workflows 存储库的可重用工作流文件,其中包含应在其上运行的脚本。正在发生的事情是工作流正在尝试使用 repo terraform-do-database
name: Tag Validation
on:
pull_request:
branches: [master]
workflow_call:
jobs:
tag_check:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Verify the tag value
run: ./scripts/tag_verify.sh
所以问题是:如何让工作流使用存储在 git-worflows 存储库中的脚本而不是 terraform-do-database?
我想要一个可以调用工作流和脚本的存储库,我不想在我的所有存储库中复制所有内容。
【问题讨论】:
标签: github github-actions workflow