我可以在没有任何工作的情况下进行GitHub操作工作流程吗?

发布于 2025-01-31 08:40:31 字数 1169 浏览 3 评论 0原文

在将现有的Azure Devops Yaml管道转换为GitHub Actions YAML时,我注意到我的一些Azure管道只是在调用其他YAML文件的模板。

trigger:
- master
 
resources:
  repositories:
    - repository: templates
      type: git 
      name: 'Cloud Integration\PipelineTemplates'
 
name: $(Build.SourceBranchName)_$(Build.Reason)_$(rev:r)
 
variables:
  - group: var-lc-integration-emailservice
  - name: logicapp_workflows
    value: false
  - name: base_resources
    value: false
  - name: functionapp_resources
    value: false
  - name: functionapp
    value: false
  - name: ia_resources
    value: false
  - name: ia_configs
    value: false
  - name: apim_resources
    value: true
 
stages:
- template: yml-templates\master.yml@templates
  parameters:
    logicapp_workflows: ${{ variables.logicapp_workflows }}
    base_resources: ${{ variables.base_resources }}
    functionapp_resources: ${{ variables.functionapp_resources }}
    functionapp: ${{ variables.functionapp }}
    ia_resources: ${{ variables.ia_resources }}
    ia_configs: ${{ variables.ia_configs }}
    apim_resources: ${{ variables.apim_resources }}

在为上述Azure管道编写github工作流程时,我们可以在工作流程中找到“虚拟工作”还是根本没有工作来解决此问题?

When translating existing Azure DevOps YAML pipelines to GitHub Actions YAML, I noticed some of my Azure pipelines were just templates calling other YAML files.

trigger:
- master
 
resources:
  repositories:
    - repository: templates
      type: git 
      name: 'Cloud Integration\PipelineTemplates'
 
name: $(Build.SourceBranchName)_$(Build.Reason)_$(rev:r)
 
variables:
  - group: var-lc-integration-emailservice
  - name: logicapp_workflows
    value: false
  - name: base_resources
    value: false
  - name: functionapp_resources
    value: false
  - name: functionapp
    value: false
  - name: ia_resources
    value: false
  - name: ia_configs
    value: false
  - name: apim_resources
    value: true
 
stages:
- template: yml-templates\master.yml@templates
  parameters:
    logicapp_workflows: ${{ variables.logicapp_workflows }}
    base_resources: ${{ variables.base_resources }}
    functionapp_resources: ${{ variables.functionapp_resources }}
    functionapp: ${{ variables.functionapp }}
    ia_resources: ${{ variables.ia_resources }}
    ia_configs: ${{ variables.ia_configs }}
    apim_resources: ${{ variables.apim_resources }}

While writing a GitHub workflow for the above Azure pipeline, Can we have a "dummy job" or no job at all within a workflow to solve this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蝶舞 2025-02-07 08:40:31

iiuc是的,请参见重复使用github操作工作流程

它使您可以从存储库中调用另一个工作流程,并根据需要提供输入/秘密。

IIUC yes, see reusing GitHub Actions workflows.

It allows you to call another workflow from your repository and provide inputs/secrets as necessary.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文