Skip to content

Commit a6963d1

Browse files
authored
Fixes for truss release automation (#589)
* Fix PR creation. * Add current version. * Fix more issues. * Actually use the body that is set. * Fix basetenbot email. * Update email of baseten-bot.
1 parent 01933d7 commit a6963d1

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/commit_new_release_to_main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
- name: Check out code
1414
uses: actions/checkout@v2
1515

16-
- name: Configure Git user as baseten-bot
16+
- name: Configure Git user as basetenbot
1717
run: |
18-
git config user.name "baseten-bot"
19-
git config user.email "baseten-bot@baseten.co"
18+
git config user.name "basetenbot"
19+
git config user.email "96544894+basetenbot@users.noreply.github.com"
2020
2121
- name: Fetch all branches
2222
run: |

.github/workflows/create_release_pr.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828

2929
- name: Commit changes
3030
run: |
31-
git config --local user.email "baseten-bot@baseten.co"
32-
git config --local user.name "baseten-bot"
31+
git config --local user.email "96544894+basetenbot@users.noreply.github.com"
32+
git config --local user.name "basetenbot"
3333
git add pyproject.toml
3434
git commit -m "Bump version to $INPUT_VERSION"
3535
env:
@@ -44,7 +44,10 @@ jobs:
4444

4545
- name: Make PR
4646
run: |
47-
PR_URL=gh pr create --base release --head refs/heads/bump-version-$INPUT_VERSION --title "Release $INPUT_VERSION"
47+
CURR_VERSION=$(curl https://pypi.org/pypi/truss/json | jq ".info.version")
48+
PR_BODY="Updating Truss from [$CURR_VERSION](https://pypi.org/pypi/truss/json) to $INPUT_VERSION."
49+
PR_URL=$(gh pr create --base release --head refs/heads/bump-version-$INPUT_VERSION --title "Release $INPUT_VERSION" --body "$PR_BODY")
4850
gh pr merge $PR_URL --auto --merge
4951
env:
5052
INPUT_VERSION: ${{ github.event.inputs.version }}
53+
GH_TOKEN: ${{ secrets.BASETENBOT_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)