Skip to content

Commit

Permalink
Do not fail the update template workflow on update (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico committed Apr 21, 2023
1 parent efc7aa2 commit 823ab97
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/auto-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ jobs:
node-version: 16

- name: Check React Native Version
run: yarn outdated react-native
id: yarnoutdated
working-directory: ReproducerApp
run: |
yarn outdated react-native
if [ $? -ne 0 ]; then
echo ::set-env name=SHOULD_UPDATE_TEMPLATE::true
else
echo ::set-env name=SHOULD_UPDATE_TEMPLATE::false
fi
- name: Re-create the reproducer
id: recreate
if: failure()
if: env.SHOULD_UPDATE_TEMPLATE == 'true'
run: |
rm -rf ReproducerApp
npx react-native@latest init ReproducerApp --skip-install
Expand All @@ -41,7 +47,7 @@ jobs:
- name: Push changes
uses: ad-m/github-push-action@master
if: failure()
if: env.SHOULD_UPDATE_TEMPLATE == 'true'
with:
branch: main
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 823ab97

Please sign in to comment.