Skip to content

Commit

Permalink
Switch to GH error message workflow command
Browse files Browse the repository at this point in the history
  • Loading branch information
budak7273 committed Dec 12, 2024
1 parent 3470dcd commit 3027829
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ jobs:
- name: Check for permission to run CI
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
if: ${{ env.GH_TOKEN == '' }}
# Temporarily != to ensure it fails
if: ${{ env.GH_TOKEN != '' }}
shell: bash
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-error-message
run: |
if [ \"$SECRET\" == \"\" ]; then
echo \"Pull requests made by users not in the organization (intentionally) can't access the CI secrets. Ignore this CI failure - the team will be building the project locally anyways to test it out." >> $GITHUB_OUTPUT
exit 1
else
echo \"Temporarily fail this case anyways as a test" >> $GITHUB_OUTPUT
exit 2
fi
echo "::error title=External Contributor PR::Pull requests made by users not in the organization (intentionally) can't access the CI secrets. Ignore this CI failure - the team will be building the project locally anyways to test it out."
exit 1
- uses: actions/checkout@v2
with:
Expand Down

0 comments on commit 3027829

Please sign in to comment.