Skip to content

Commit

Permalink
Make the AutoRevision update PR against the tagged branch
Browse files Browse the repository at this point in the history
We need to update AutoRevision.txt in both the stable and master branches, so
try to do that automatically.
  • Loading branch information
lmoureaux committed Feb 12, 2023
1 parent 6894c9d commit 8921098
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ jobs:
- run: git rev-parse --short=5 HEAD > cmake/AutoRevision.txt
- run: git describe --tags `git rev-list --tags --max-count=1` >> cmake/AutoRevision.txt
- run: cat cmake/AutoRevision.txt
- name: Find target branch
id: branch
# We're running on a tag so have no direct access to the branch. Find it.
# echo is used to trim whitespace
run: |
git branch -a
echo Target branch: $(git branch --contains HEAD)
echo branch=$(echo $(git branch --contains HEAD)) >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
base: ${{ steps.branch.outputs.branch }}
commit-message: "Release update of AutoRevision.txt"
branch: "release/autorevision"
branch: "release/autorevision-{{ steps.branch.outputs.target }}"
title: "Release update of AutoRevision.txt"
body: >
Automatic changes triggered by a new release.
Expand Down

0 comments on commit 8921098

Please sign in to comment.