File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 workflow_dispatch :
99 inputs :
1010 environment :
11- description : ' Environment (Production or Staging)'
11+ description : ' Environment (Production, Staging or Staging API )'
1212 required : true
1313 type : choice
1414 options :
1515 - Production
1616 - Staging
17+ - Staging API
18+
1719jobs :
1820 setup :
1921 runs-on : ubuntu-latest
5456 VAULT_APPROLE_ROLE_ID : ${{ secrets.VAULT_APPROLE_ROLE_ID }}
5557 VAULT_APPROLE_SECRET_ID : ${{ secrets.VAULT_APPROLE_SECRET_ID }}
5658 CHARMHUB_TOKEN : ${{ secrets.CHARMHUB_TOKEN }}
59+
60+ deploy-staging-api-env-on-merge-into-main :
61+ # this job can only run when invoked by CI because of a merge into main
62+ if : ${{ github.event.inputs.environment == '' && github.ref == 'refs/heads/main' }}
63+ # we will dispatch another copy of this workflow to deploy the Staging API env; we invoke the workflow
64+ # with an input, so `github.event.inputs.environment` won't be "" and the `if` condition above will be
65+ # false, thus there won't be a recursive loop
66+ uses : canonical/snapcraft.io/.github/workflows/deploy.yaml@main
67+ with :
68+ environment : Staging API
You can’t perform that action at this time.
0 commit comments