mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Reimplemented canary builds on main
refs https://github.com/TryGhost/DevOps/issues/47 - this adds a canary job that waits for successful tests and then kicks off the Docker build step
This commit is contained in:
parent
8c393a2b55
commit
0a7fb4c881
1 changed files with 24 additions and 0 deletions
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
|
@ -749,3 +749,27 @@ jobs:
|
|||
if: contains(needs.*.result, 'failure')
|
||||
run: |
|
||||
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1
|
||||
|
||||
canary:
|
||||
needs: [
|
||||
job_get_metadata,
|
||||
job_required_tests
|
||||
]
|
||||
name: Canary
|
||||
runs-on: ubuntu-latest
|
||||
if: always() && needs.job_get_metadata.outputs.is_canary_branch == 'true' && !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped'))
|
||||
steps:
|
||||
- name: Set env variables
|
||||
run: |
|
||||
echo "CANARY_BUILD_INPUTS={\"version\":\"canary\",\"environment\":\"staging\"}" >> $GITHUB_ENV
|
||||
|
||||
- name: Invoke build
|
||||
uses: aurelien-baudet/workflow-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.CANARY_DOCKER_BUILD }}
|
||||
workflow: .github/workflows/deploy.yml
|
||||
ref: 'refs/heads/main'
|
||||
repo: TryGhost/Ghost-Moya
|
||||
inputs: ${{ env.CANARY_BUILD_INPUTS }}
|
||||
wait-for-completion-timeout: 25m
|
||||
wait-for-completion-interval: 30s
|
||||
|
|
Loading…
Add table
Reference in a new issue