-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RN][CI] Add ci job to check if nightly succeeded
- Loading branch information
1 parent
c82edec
commit 2a28922
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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 | ||
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 |