【发布时间】:2022-07-06 21:11:36
【问题描述】:
我有两个工作流程。工作流程 A 和 B。我只想在工作流程 A 完成时触发工作流程 B。但是当工作流A失败时,会触发工作流B吗?
我的工作流程 A:
name: Security
on:
workflow_run:
workflows: ["Bygg og test"]
types:
- completed
schedule:
- cron: '0 3 * * *'
我的工作流程 B:
name: Deploy dev og prod
on:
workflow_run:
workflows: ["Security"]
types:
- completed
env:
IMAGE: ghcr.io/${{ github.repository }}:${{ github.sha }}
jobs:
deploy-dev-gcp:
name: Deploy til dev-gcp
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .nais/naiserator.yaml
VARS: .nais/dev-gcp.json
我错过了什么吗?
【问题讨论】:
-
请注意,
actions/checkout操作在v3中可用
标签: github-actions