From 64bed6f3decac9c9d905ee004f3f6a0f0102cb7a Mon Sep 17 00:00:00 2001 From: "Reynaud, Raphael" Date: Mon, 29 Jan 2024 16:22:47 +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 c1b95d2..272b3f3 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -3,14 +3,23 @@ name: static-analysis on: push: branches: [ master ] - + # 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',