aryashah2k
aryashah2k

Reputation: 538

Can I have a GitHub Actions Workflow without any Jobs inside?

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?

Upvotes: 1

Views: 1010

Answers (1)

Szymon Maszke
Szymon Maszke

Reputation: 24681

IIUC yes, see reusing GitHub Actions workflows.

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

Upvotes: 1

Related Questions