diff --git a/.github/workflows/check-nightly.yml b/.github/workflows/check-nightly.yml new file mode 100644 index 00000000000..2fb26d10811 --- /dev/null +++ b/.github/workflows/check-nightly.yml @@ -0,0 +1,26 @@ +# This jobs runs every day 2 hours after the nightly job and its purpose is to report +# a failure in case the nightly failed to be published. We are going to hook this to an internal automation. +name: Check Nigthlies + +on: + workflow_dispatch: + # nightly build @ 4:15 AM UTC + schedule: + - cron: '15 4 * * *' + +jobs: + check-nightly: + runs-on: ubuntu-latest + if: github.repository == 'facebook/react-native' + steps: + - name: Check nightly + run: | + TODAY=$(date "+%Y%m%d") + echo "Checking nightly for $TODAY" + NIGHTLY="$(npm view react-native | grep $TODAY)" + if [[ -z $NIGHTLY ]]; then + echo 'Nightly job failed.' + exit 1 + else + echo 'Nightly Worked, All Good!' + fi