From ee0ba3616cee8bbb5d0832f1f08a1d465512a075 Mon Sep 17 00:00:00 2001 From: Ryan van Zeben Date: Fri, 25 Aug 2023 16:34:59 -0400 Subject: [PATCH] Switch to numerical update check as bools aren't processing correct --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3650f1509..0a3100d35 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,19 +68,19 @@ jobs: echo "Current dotnet runtime hash result: $DOTNET_RUNTIME_HASH" echo "Current Externals hash result: $EXTERNALS_HASH" - NeedUpdate=false + NeedUpdate=0 if [ "$EXTERNALS_HASH" != "$(cat ./src/Misc/contentHash/externals/${{ matrix.runtime }})" ] ;then echo Hash mismatch, Update ./src/Misc/contentHash/externals/${{ matrix.runtime }} to $EXTERNALS_HASH echo "EXTERNAL_HASH=$EXTERNALS_HASH" >> $GITHUB_OUTPUT - NeedUpdate=true + NeedUpdate=1 fi if [ "$DOTNET_RUNTIME_HASH" != "$(cat ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }})" ] ;then echo Hash mismatch, Update ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }} to $DOTNET_RUNTIME_HASH echo "DOTNET_RUNTIME_HASH=$DOTNET_RUNTIME_HASH" >> $GITHUB_OUTPUT - NeedUpdate=true + NeedUpdate=1 fi echo "NEED_UPDATE=$NeedUpdate" >> $GITHUB_OUTPUT @@ -88,7 +88,7 @@ jobs: DOTNET_RUNTIME_HASH: ${{hashFiles('**/_layout_trims/runtime/**/*')}} EXTERNALS_HASH: ${{hashFiles('**/_layout_trims/externals/**/*')}} - name: update hash - if: ${{ ! github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && steps.compute-hash.outputs.NEED_UPDATE == true }} + if: ${{ ! github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && steps.compute-hash.outputs.NEED_UPDATE == 1 }} shell: bash run: | ExternalHash=${{ steps.compute-hash.outputs.EXTERNAL_HASH }} @@ -102,7 +102,7 @@ jobs: echo "$DotNetRuntimeHash" > ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }} fi - name: cache updated hashes - if: ${{ ! github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && steps.compute-hash.outputs.NEED_UPDATE == true }} + if: ${{ ! github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && steps.compute-hash.outputs.NEED_UPDATE == 1 }} uses: actions/cache/save@v3 with: enableCrossOsArchive: true @@ -111,11 +111,11 @@ jobs: ./src/Misc/contentHash/dotnetRuntime/${{ matrix.runtime }} key: compute-hashes-${{ matrix.runtime }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} - name: Create an warning annotation if computed hashes will automatically be updated - if: ${{ ! github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && steps.compute-hash.outputs.NEED_UPDATE == true }} + if: ${{ ! github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && steps.compute-hash.outputs.NEED_UPDATE == 1 }} shell: bash run: echo "::warning ::Computed hashes do not match, we will automatically update these for you, you can safely ignore the errors on this job" && exit 1 - name: Create an error annotation if computed hashes need to be updated for a fork - if: ${{ github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && steps.compute-hash.outputs.NEED_UPDATE == true }} + if: ${{ github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' && steps.compute-hash.outputs.NEED_UPDATE == 1 }} shell: bash run: | ExternalHash=${{ steps.compute-hash.outputs.EXTERNAL_HASH }} @@ -138,7 +138,7 @@ jobs: run: | ${{ matrix.devScript }} test working-directory: src - if: ${{ steps.compute-hash.outputs.NEED_UPDATE == false && matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm' && matrix.runtime != 'osx-arm64' && matrix.runtime != 'win-arm64' }} + if: ${{ steps.compute-hash.outputs.NEED_UPDATE == 0 && matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm' && matrix.runtime != 'osx-arm64' && matrix.runtime != 'win-arm64' }} # Create runner package tar.gz/zip - name: Package Release