Skip to content

Commit

Permalink
fixes to chery-pick workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnybod committed Aug 2, 2023
1 parent 82642e6 commit 4c22de7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/cherry-pick-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4c22de7

Please sign in to comment.