Skip to content

Commit 4bedcb7

Browse files
fix: Fix update version pipeline by accepting a github app credentials
1 parent 541b571 commit 4bedcb7

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/update-sourcebot-version.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ on:
44
- cron: '0 9 * * 1' # Run every Monday at 9 AM UTC
55
workflow_dispatch: # Allow manual triggering
66
workflow_call: # Allow calling from other workflows
7+
secrets:
8+
GITHUB_APP_ID:
9+
description: 'GitHub App ID for authentication'
10+
required: false
11+
GITHUB_APP_PRIVATE_KEY:
12+
description: 'GitHub App private key for authentication'
13+
required: false
714

815
jobs:
916
check-and-update:
@@ -13,11 +20,20 @@ jobs:
1320
pull-requests: write
1421

1522
steps:
23+
- name: Generate GitHub App token
24+
if: ${{ secrets.GITHUB_APP_ID != '' && secrets.GITHUB_APP_PRIVATE_KEY != '' }}
25+
id: generate_token
26+
uses: actions/create-github-app-token@v1
27+
with:
28+
app-id: ${{ secrets.GITHUB_APP_ID }}
29+
private-key: ${{ secrets.GITHUB_APP_PRIVATE_KEY }}
30+
repositories: sourcebot-helm-chart
31+
1632
- name: Checkout repository
1733
uses: actions/checkout@v4
1834
with:
1935
repository: sourcebot-dev/sourcebot-helm-chart
20-
token: ${{ secrets.GITHUB_TOKEN }}
36+
token: ${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}
2137

2238
- name: Get current Sourcebot version
2339
id: current-version
@@ -89,7 +105,7 @@ jobs:
89105
if: steps.version-check.outputs.needs_update == 'true'
90106
uses: peter-evans/create-pull-request@v6
91107
with:
92-
token: ${{ secrets.GITHUB_TOKEN }}
108+
token: ${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}
93109
commit-message: |
94110
chore: bump sourcebot to ${{ steps.latest-version.outputs.latest }}
95111

0 commit comments

Comments
 (0)