Skip to content

Commit

Permalink
fix(build-test-deploy.yml): store and use proper result
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed Feb 20, 2021
1 parent 2a72148 commit 09d35d7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,19 @@ jobs:
run: |
set +e
node -e "process.exit('${{ env.REPO_OWNER_WHITELIST }}'.split(',').some(o => o.trim().toLowerCase() == '${{ github.repository_owner }}'.toLowerCase()) ? 0 : 1)"
echo "::set-output name=is-whitelisted::$([ $? -eq 0 ] && echo 'true' || echo 'false')"
! [ -z "$DEBUG" ] && echo "set-output name=is-whitelisted::$([ $? -eq 0 ] && echo 'true' || echo 'false')" || true
RESULT=`[ $? -eq 0 ] && echo 'true' || echo 'false'`
echo "::set-output name=is-whitelisted::$RESULT"
! [ -z "$DEBUG" ] && echo "set-output name=is-whitelisted::$RESULT" || true
- name: Verify workflow actor against auto-merge whitelist
if: steps.skip.outputs.should-skip-ci != 'true'
id: automerge
run: |
set +e
node -e "process.exit('${{ env.AUTOMERGE_ACTOR_WHITELIST }}'.split(',').some(o => o.trim() == '${{ github.actor }}') ? 0 : 1)"
echo "::set-output name=allowed-to-automerge::$([ $? -eq 0 ] && echo 'true' || echo 'false')"
! [ -z "$DEBUG" ] && echo "set-output name=allowed-to-automerge::$([ $? -eq 0 ] && echo 'true' || echo 'false')" || true
RESULT=`[ $? -eq 0 ] && echo 'true' || echo 'false'`
echo "::set-output name=allowed-to-automerge::$RESULT"
! [ -z "$DEBUG" ] && echo "set-output name=allowed-to-automerge::$RESULT" || true
- name: Use node ${{ env.NODE_CURRENT_VERSION }}
if: steps.skip.outputs.should-skip-ci != 'true'
Expand All @@ -180,8 +182,8 @@ jobs:
! [ -z "$DEBUG" ] && echo 'NPMR=' $NPMR || true
if [ $? -ne 0 ]; then
echo '::error::`npm run list-tasks` failed'
if [ -z "$NPMR" ]; then
echo '::error::npm script "list-tasks" failed'
exit 1
fi
Expand Down

0 comments on commit 09d35d7

Please sign in to comment.