forked from EmpireProject/Empire
-
-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,23 +49,31 @@ jobs: | |
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email [email protected] | ||
- name: Set commitHash workflow input | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV | ||
- name: Set commitHash pull request input | ||
if: ${{ github.event_name == 'pull_request' }} | ||
run: | | ||
echo "COMMIT_HASH=$(git rev-parse ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV | ||
- name: Create cherry-pick branch | ||
run: | | ||
git checkout -b cherry-pick-${{ github.event.inputs.commitHash }} | ||
git checkout -b cherry-pick-${{ env.COMMIT_HASH }} | ||
- name: Cherry-pick commit | ||
run: | | ||
git cherry-pick ${{ github.event.inputs.commitHash }} | ||
git cherry-pick ${{ env.COMMIT_HASH }} | ||
- name: Push new branch | ||
run: git push origin cherry-pick-${{ github.event.inputs.commitHash }} | ||
run: git push origin cherry-pick-${{ env.COMMIT_HASH }} | ||
- name: Create pull request into private-main | ||
uses: thomaseizinger/create-pull-request@1.0.0 | ||
uses: thomaseizinger/create-pull-request@1.3.1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
title: Cherry-pick ${{ github.event.inputs.commitHash }} to private-main | ||
body: | | ||
This pull request was automatically created by a GitHub Action. | ||
The commit ${{ github.event.inputs.commitHash }} was cherry-picked from the main branch. | ||
The commit ${{ env.COMMIT_HASH }} was cherry-picked from the main branch. | ||
Merge the pull request. **DO NOT SQUASH** | ||
head: cherry-pick-${{ github.event.inputs.commitHash }} | ||
head: cherry-pick-${{ env.COMMIT_HASH }} | ||
base: private-main | ||
repository: BC-Security/Empire-Sponsors |