-
-
Notifications
You must be signed in to change notification settings - Fork 199
64 lines (62 loc) · 2.21 KB
/
prerelease-sponsor-kali-merge-private.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
58
59
60
61
62
63
64
# This merges two things.
# It merges BC-SECURITY/Starkiller#private-main into BC-SECURITY/Starkiller-Sponsors#sponsors-main
# It merges BC-SECURITY/Starkiller#private-main into BC-SECURITY/Starkiller-Sponsors#kali-main
name: Prerelease - Merge private-main
on:
pull_request:
types:
- closed
branches:
- private-main
workflow_dispatch:
inputs:
mergeKali:
description: "Merge private-main branch into kali-main."
type: boolean
default: true
required: true
mergeSponsors:
description: "Merge private-main branch into sponsors-main."
type: boolean
default: true
required: true
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
merge_main:
# If its a workflow dispatch, always run.
# If its a pull request, run if the pull request has the label 'auto-merge-downstream'.
# Already filtered above to closed PRs on private-main.
if: ${{ github.repository == 'BC-Security/Starkiller-Sponsors' &&
(github.event_name == 'workflow_dispatch' ||
(github.event.pull_request &&
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'auto-merge-downstream'))) }}
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: "recursive"
ref: private-main
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email [email protected]
- name: Clean Merge private-main->sponsors-main
if: ${{ github.event.inputs.mergeSponsors == 'true' || github.event.pull_request }}
uses: ./.github/actions/clean-merge
with:
from-branch: private-main
to-branch: sponsors-main
push-repo: origin
- name: Clean Merge private-main->kali-main
if: ${{ github.event.inputs.mergeKali == 'true' || github.event.pull_request }}
uses: ./.github/actions/clean-merge
with:
from-branch: private-main
to-branch: kali-main
push-repo: origin