Skip to content

Commit

Permalink
Switch to powershell instead of bash (whoops), move check earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
budak7273 committed Dec 12, 2024
1 parent 3027829 commit 7a2e89d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@ jobs:
build:
runs-on: self-hosted
steps:
- name: Cleanup
run: Remove-Item * -Recurse -Force -Confirm:$false -ErrorAction Ignore

- name: Check for permission to run CI
env:
GH_TOKEN: ${{ secrets.BOT_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
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions?tool=powershell#setting-an-error-message
run: |
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."
Write-Output "::error title=External Contributor PR::Pull requests made by users not in the organization intentionally can't access the CI secrets. Don't worry about the CI failure, the team will build the project locally to test it out anyways."
exit 1
- name: Cleanup
run: Remove-Item * -Recurse -Force -Confirm:$false -ErrorAction Ignore

- uses: actions/checkout@v2
with:
path: SML
Expand Down

0 comments on commit 7a2e89d

Please sign in to comment.