Skip to content

Commit

Permalink
Fix whitespace issues in workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Rautiola <joonas.rautiola@unikie.com>
  • Loading branch information
joinemm committed Jun 20, 2024
1 parent c920c2a commit 6e757e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test-ghaf-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ jobs:
shell: bash
run: |
# AUTHORIZED_USERS is a newline separated list of usernames
if echo "${{ vars.AUTHORIZED_USERS }}" | grep -F -x -q "${{ github.actor }}"; then
if echo "${{ vars.AUTHORIZED_USERS }}" | tr -s '[:space:]' '\n' | grep -Fxq "${{ github.actor }}"; then
echo "User is authorized"
echo "authorized_user=True" >> "$GITHUB_OUTPUT"
else
echo "User not authorized"
echo "authorized_user=False" >> "$GITHUB_OUTPUT"
fi
# Authorization passes without approval if
# - the event is not a pull request (eg. push to main)
# - pull request comes from another branch in the same repo
Expand Down

0 comments on commit 6e757e2

Please sign in to comment.