Skip to content

Commit 4f45a7f

Browse files
Fix rust-sdk-release workflow (#3332)
Signed-off-by: Brian Hardock <[email protected]>
1 parent 41659b6 commit 4f45a7f

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/rust-sdk-release.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,34 @@ on:
55
types:
66
- rust-sdk-release
77

8+
permissions:
9+
contents: write # allows commits/pushes
10+
pull-requests: write # allows PR creation
11+
812
jobs:
913
create-pr:
1014
name: Create PR with Spin Rust Templates SDK Dependency Bump
1115
runs-on: ubuntu-latest
16+
1217
steps:
18+
# Checkout the repository
1319
- uses: actions/checkout@v4
20+
with:
21+
persist-credentials: true # uses GITHUB_TOKEN automatically
22+
fetch-depth: 0
23+
24+
# Configure git identity for commits
25+
- name: Configure git
26+
run: |
27+
git config user.name "spinframeworkbot"
28+
git config user.email "[email protected]"
1429
30+
# Run script to update the templates
1531
- name: Bump Rust Templates SDK Dependency
1632
shell: bash
1733
run: ./scripts/bump-rust-template-sdk.sh ${{ github.event.client_payload.version }}
1834

35+
# Import GPG key for signing commits
1936
- name: Import GPG key
2037
uses: crazy-max/ghaction-import-gpg@v6
2138
with:
@@ -24,16 +41,18 @@ jobs:
2441
git_user_signingkey: true
2542
git_commit_gpgsign: true
2643

44+
# Create the pull request
2745
- name: Create Pull Request
2846
uses: peter-evans/create-pull-request@v7
2947
with:
3048
commit-message: "chore(rust-templates): bump Spin Rust SDK to ${{ github.event.client_payload.version }}"
3149
title: "chore(rust-templates): bump Spin Rust SDK to ${{ github.event.client_payload.version }}"
32-
body: Update the Spin Rust Templates SDK dependency to ${{ github.event.client_payload.version }}
50+
body: |
51+
Update the Spin Rust Templates SDK dependency to ${{ github.event.client_payload.version }}.
3352
branch: bump-spin-rust-sdk-${{ github.event.client_payload.version }}
3453
base: main
3554
delete-branch: true
3655
committer: spinframeworkbot <[email protected]>
3756
author: spinframeworkbot <[email protected]>
3857
signoff: true
39-
token: ${{ secrets.PAT }}
58+
token: ${{ github.token }}

0 commit comments

Comments
 (0)