From c18542e5dfd8c6702f66f2f3472c1852533bcb61 Mon Sep 17 00:00:00 2001 From: "Reynaud, Raphael" Date: Mon, 29 Jan 2024 16:25:37 +0100 Subject: [PATCH] DIOS-3785 Update static-analysis.yaml to use dynamic token --- .github/workflows/static-analysis.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index 8694d63..5fbb8eb 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -2,15 +2,24 @@ name: static-analysis on: push: - branches: [ master ] + branches: [ master, dev/rrd/DIOS-3785-static-analysis-dynamic-token ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: dispatch: runs-on: ubuntu-latest steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.APP_CHECKOUT_ID }} + private-key: ${{ secrets.APP_CHECKOUT_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: "static-analysis" - uses: actions/github-script@v6 with: - github-token: ${{ secrets.PAT_STATIC_ANALYSIS }} + github-token: ${{ steps.app-token.outputs.token }} script: | await github.rest.actions.createWorkflowDispatch({ owner: 'medooze',