push
)。
needs
属性在它们之间建立依赖关系。示例:
jobs:
job1:
name: Run 1st job
job2:
name: Run 2nd job
needs: job1
文档 -
name: workflow-name
on:
workflow_run:
# this is the requisite workflow
workflows: ["previous-workflow-name"]
types:
- completed
jobs:
job1:
# Runs the steps only if the previous-workflow-name workflow is successful
# Doesn't mean it's completed then i'ts successfull
# https://github.com/orgs/community/discussions/26238
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps: