Skip to content

Commit

Permalink
chore: block deploy requests from non-develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Nov 15, 2024
1 parent 5431111 commit 78cdf2a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/deploy-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check Deploy

on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- edited

jobs:
check:
runs-on: ubuntu-latest
steps:
- run: |
if [ ${{ github.head_ref }} != "develop" ] && [ ${{ github.base_ref }} == "main" ]; then
echo "Pull requests to main branch are only allowed from develop branch."
exit 1
fi

Check failure

Code scanning / CodeQL

Expression injection in Actions Critical

Potential injection from the ${{ github.head_ref }}, which may be controlled by an external user.

0 comments on commit 78cdf2a

Please sign in to comment.