Skip to content

Merge pull request #8 from artisan-community/start-automating-package… #7

Merge pull request #8 from artisan-community/start-automating-package…

Merge pull request #8 from artisan-community/start-automating-package… #7

Workflow file for this run

name: Prevent Direct Push to Main
on:
push:
branches:
- main
jobs:
prevent-direct-push:
runs-on: ubuntu-latest
steps:
- name: Check if Push is Direct
run: |
if [[ "${{ github.event_name }}" == "push" && "${{ github.event.head_commit.message }}" != *"Merge pull request"* ]]; then
echo "Direct pushes to the main branch are not allowed. Please use a pull request."
exit 1
fi