Skip to content

Commit 09283a7

Browse files
committed
use github app to dispatch event instead of a PAT
a PAT may expire https://github.com/organizations/VSETH-GECO/settings/apps/geco-deployment
1 parent 4860149 commit 09283a7

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/push.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Create and publish a Docker image
22

33
on:
44
push:
5-
branches: ['main']
5+
branches: ["main"]
66

77
env:
88
REGISTRY: ghcr.io
@@ -36,10 +36,20 @@ jobs:
3636
tags: ${{ env.REGISTRY }}/vseth-geco/radius:${{ env.SHORT_SHA }}
3737
labels: ${{ steps.meta.outputs.labels }}
3838

39+
- name: Generate GitHub App Token
40+
uses: actions/create-github-app-token@v2
41+
id: app-token
42+
with:
43+
app-id: ${{ vars.GECO_DEPLOYMENT_APP_ID }}
44+
private-key: ${{ secrets.GECO_DEPLOYMENT_APP_PRIVATE_KEY }}
45+
owner: ${{ github.repository_owner }}
46+
repositories: |
47+
k8s
48+
3949
- name: Update k8s repo
4050
uses: peter-evans/repository-dispatch@v3
4151
with:
42-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
52+
token: ${{ steps.app-token.outputs.token }}
4353
repository: VSETH-GECO/k8s
4454
event-type: radius
4555
client-payload: |

0 commit comments

Comments
 (0)