github-actions - Git Hub actions for multiple repos
问题描述
Just wondering if there is a way to use a Github action across multiple repos. Basically seeing if there is a similar way to do something similar to this from azure devops.
I have the same script i need to run on multiple repos, which currently I have created a template of so I can quickly create it across repos, however if I need to modify that template I will need to change it in all the repos which would be fairly time consuming.
My thinking is that i can create a plugin similar to the ones you can get on the marketplace and create a step to use that, but is this the best way of doing it/is there a way to do this privately.
Thanks
EDIT: With some looking i have got a action that looks like the following (ignore the names etc that are still in from a sample)
name: "Hello World"
description: "Greet someone"
inputs:
unity-key:
default: ""
description: "Unity Key"
required: true
runs:
using: composite
steps:
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: "${{ inputs.unity-key }}"
with:
buildMethod: UnityEditor.SyncVS.SyncSolution
targetPlatform: StandaloneWindows
- uses: nikeee/docfx-action@v1.0.0
name: Build
with:
args: Documentation/docfx.json
- uses: actions/upload-artifact@v2
name: "Upload site artifact"
with:
name: _site
path: _site
and then calling it in another repos step process as following snippet. It does find the action and attempts to run it. But then errors out. Looking around i can not see any references that say i can have uses steps within another action, but this seems like a very limited feature, so not sure if im just missing something.
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# with:
# submodules: true
- uses: Greener-Games/Generate-Documentation@v1.0.5
with:
unity-key: ${{ secrets.UNITY_LICENCE_2019_4_12F1 }}
解决方案
推荐阅读
- r - 广义加法模型。根据我放的 K 尺寸,我得到不同的结果
- amazon-web-services - 构建识别用户代理的工具
- nuget - 从 NuPkg 读取 NuSpec
- django - Django ALLOWED_HOSTS 中的 0.0.0.0 是否存在安全风险?
- reactjs - ReactJS,Formik - 验证字段,将值与另一个进行比较
- sql-server - 附件文件无效 - SQL Server 2014
- vim - 在可视模式下运行过滤器 (!) 命令
- c# - Why is vbs able to find the INSTALLLOCATION when C# using both DTF and MSI API cannot?
- reactjs - 在反应钩子上设置事件处理程序(useEffect)
- graphql - 如何在 Hot Chocolate 中拆分查询类型的解析器