1
0
mirror of synced 2026-01-08 21:02:10 -05:00

Change workflow_run actions to address the new world of moda (#53631)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Kevin Heis
2024-12-16 10:38:12 -08:00
committed by GitHub
parent ad37e876df
commit 3c2cf8347f
3 changed files with 22 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ on:
schedule:
- cron: '20 16 * * *' # Run every 24 hours at 20 minutes past the hour
workflow_run:
workflows: ['Azure Production - Build and Deploy']
workflows: ['Purge Fastly']
types:
- completed

View File

@@ -7,8 +7,7 @@ name: Notify about production deployment
on:
workflow_dispatch:
workflow_run:
# Note, we could do this after the "Purge Fastly" finished
workflows: ['Azure Production - Build and Deploy']
workflows: ['Purge Fastly']
types:
- completed

View File

@@ -16,10 +16,9 @@ on:
description: "Comma separated languages. E.g. 'en,ja, es' (defaults to all)"
required: false
default: ''
workflow_run:
workflows: ['Azure Production - Build and Deploy']
types:
- completed
push:
branches:
- main
permissions:
contents: read
@@ -43,6 +42,23 @@ jobs:
- uses: ./.github/actions/node-npm-setup
- name: Wait for production to match build number
run: |
needs=$(git rev-parse HEAD)
start_time=$(date +%s)
timeout_seconds=1200
while [[ $needs != $(curl -s --fail --retry-connrefused --retry 5 https://docs.github.com/_build) ]]
do
if [[ $(($(date +%s) - $start_time)) -gt $timeout_seconds ]]
then
echo "Production did not match the build number within $timeout_seconds seconds"
exit 1
fi
echo "Production is not up to date with the build commit"
sleep 10
done
echo "Production is up to date with the build commit"
- name: Purge Fastly edge cache independent of language
if: ${{ inputs.nuke_all }}
run: npm run purge-fastly-edge-cache