Skip to content

Commit

Permalink
Tightening pr author check
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed Jun 8, 2024
1 parent e33bec3 commit 6c1ebc5
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,9 @@ jobs:
steps:
- name: Check PR author
run: |
set -e
echo "IGNORED_PR_AUTHORS: ${{ vars.IGNORED_PR_AUTHORS }}"
echo "PR author: ${{ env.PR_AUTHOR }}"
echo "AUTHOR_IS_IGNORED: ${{ env.AUTHOR_IS_IGNORED }}"
echo "PR author is ${{ env.PR_AUTHOR }}"
if [[ "${{ env.AUTHOR_IS_IGNORED }}" == "true" ]]
then
echo "PR author (${{ env.PR_AUTHOR }}) is ignored. Skipping deployment..."
exit 1
fi
if: ${{ vars.IGNORED_PR_AUTHORS }}
echo "PR Author accepted. Continuing..."
if: ${{ vars.IGNORED_PR_AUTHORS && env.AUTHOR_IS_IGNORED == 'false' }}
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
AUTHOR_IS_IGNORED: $(echo '${{ vars.IGNORED_PR_AUTHORS }}' | jq --arg author "${{ github.event.pull_request.user.login }}" 'any(.[]; . as $user | $author | match($user))')

BranchNameLength:
Expand Down

0 comments on commit 6c1ebc5

Please sign in to comment.