From 823ab97620a9e575f4df6485611fa290149ee866 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 21 Apr 2023 12:15:33 +0100 Subject: [PATCH] Do not fail the update template workflow on update (#2) --- .github/workflows/auto-updater.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-updater.yml b/.github/workflows/auto-updater.yml index f115d52..c4dec0e 100644 --- a/.github/workflows/auto-updater.yml +++ b/.github/workflows/auto-updater.yml @@ -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 @@ -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 }}