Add auto-merge workflow - zero manual intervention
This commit is contained in:
27
.github/workflows/auto-merge.yml
vendored
Normal file
27
.github/workflows/auto-merge.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Auto-Merge Everything
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
push:
|
||||
branches: [main, master]
|
||||
|
||||
jobs:
|
||||
auto-merge:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Auto-merge PRs
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
gh pr merge ${{ github.event.pull_request.number }} --auto --squash
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Deploy on push
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
echo "Deployment triggered by Cloudflare Worker"
|
||||
curl -X POST https://blackroad-deploy-dispatcher.amundsonalexa.workers.dev/webhook/github \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"ref\":\"${{ github.ref }}\",\"repository\":{\"full_name\":\"${{ github.repository }}\"},\"after\":\"${{ github.sha }}\",\"pusher\":{\"name\":\"${{ github.actor }}\"}}"
|
||||
Reference in New Issue
Block a user