Skip to content

[RN][CI] Add ci job to check if nightly succeeded #1

[RN][CI] Add ci job to check if nightly succeeded

[RN][CI] Add ci job to check if nightly succeeded #1

Workflow file for this run

name: Check Nigthlies
description: 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.
on:
workflow_dispatch:
pull_request: # Remove this after testing
# nightly build @ 4:15 AM UTC
schedule:
- cron: '15 4 * * *'
jobs:
check-nightly:
runs-on: ubuntu-latest

Check failure on line 13 in .github/workflows/check-nightly.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check-nightly.yml

Invalid workflow file

You have an error in your yaml syntax on line 13
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 'No nightly'
exit 1
else
echo 'Nightly Worked, All Good!'
fi