forked from gravwell/gravwell
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.54 KB
/
sync-branches.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
jobs:
debug:
name: Debug
runs-on: ubuntu-latest
steps:
- name: "Echo (some of) github context"
run: |
echo ${{ github.repository }}
echo ${{ github.ref }}
echo ${{ github.ref_name }}
sync:
if: "${{ github.repository == 'gravwell/gravwell' }}"
strategy:
fail-fast: false
matrix:
branches:
- source_pattern: main
target_pattern: next-patch
- source_pattern: next-patch
target_pattern: next-minor
- source_pattern: next-minor
target_pattern: next-major
- source_pattern: next-patch
target_pattern: preview/patch/*
- source_pattern: next-minor
target_pattern: preview/minor/*
- source_pattern: next-major
target_pattern: preview/major/*
name: "${{ matrix.branches.source_pattern }} => ${{ matrix.branches.target_pattern }}"
runs-on: ubuntu-latest
steps:
- name: Open/Update PR
id: sync-branches
uses: "gravwell/sync-branches@v1"
with:
GITHUB_TOKEN: "${{ github.token }}"
PR_CREATE_TOKEN: "${{ secrets.PR_CREATE_TOKEN }}"
source_pattern: ${{ matrix.branches.source_pattern }}
target_pattern: ${{ matrix.branches.target_pattern }}
use_intermediate_branch: "True"
source_conflict_label: "src conflict"
target_conflict_label: "conflict"
name: Sync branches
on:
push:
branches: "**"
permissions:
contents: write
pull-requests: write