Skip to content

Commit e8632c9

Browse files
committed
ci: replace PATs for tokens generated by a GitHub app
1 parent f7ddd25 commit e8632c9

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/sbom.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ jobs:
9898
diff sbom_prev_normalized.json sbom_current_normalized.json || true
9999
fi
100100
101+
# Generate a token to perform the commit in the next step
102+
- name: Generate GitHub App token
103+
id: app-token
104+
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
105+
with:
106+
app-id: ${{ secrets.TRANSLATION_APP_ID }}
107+
private-key: ${{ secrets.TRANSLATION_APP_PRIVATE_KEY }}
108+
101109
# Commit the SBOM file only if it differs from master to avoid unnecessary commits
102110
- name: Commit and push updated SBOM
103111
if: steps.compare.outputs.no_changes == 'false'
@@ -107,4 +115,4 @@ jobs:
107115
files: sbom.json
108116
email: devops@owncloud.com
109117
name: ownClouders
110-
access_token: ${{ secrets.GH_PAT }}
118+
access_token: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)