forked from supabase/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 804 Bytes
/
fast-forward.yml
File metadata and controls
35 lines (31 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Fast-forward
on:
pull_request_review:
types:
- submitted
permissions:
contents: write
jobs:
approved:
if: |
github.event.pull_request.head.ref == 'develop' &&
github.event.pull_request.base.ref == 'main' &&
github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
git checkout main
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
git push origin main
publish:
needs:
- approved
permissions:
contents: write
packages: write
# Call workflow explicitly because events from actions cannot trigger more actions
uses: ./.github/workflows/release.yml
secrets: inherit