Fix merge change log workflow (#4366)

This commit is contained in:
Trask Stalnaker 2022-04-11 08:25:26 -07:00 committed by GitHub
parent 1af8cea40b
commit 7a60c445e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
# this workflow is run against the release branch (see usage of GITHUB_REF_NAME below)
# but it is creating a pull request against main
ref: main ref: main
# history is needed to run format-patch below # history is needed to run format-patch below
fetch-depth: 0 fetch-depth: 0
@ -22,7 +24,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
git format-patch --stdout main..$GITHUB_REF_NAME CHANGELOG.md | git apply git format-patch --stdout HEAD..origin/$GITHUB_REF_NAME CHANGELOG.md | git apply
msg="Merge change log updates from $GITHUB_REF_NAME to main" msg="Merge change log updates from $GITHUB_REF_NAME to main"
git commit -a -m "$msg" git commit -a -m "$msg"
git push origin HEAD:merge-change-log-updates-to-main git push origin HEAD:merge-change-log-updates-to-main