Prerelease - Merge private-main #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This merges two things. | |
# It merges BC-SECURITY/Empire#private-main into BC-SECURITY/Empire-Sponsors#sponsors-main | |
# It merges BC-SECURITY/Empire#private-main into BC-SECURITY/Empire-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/Empire-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@v3 | |
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 |