diff --git a/.github/workflows/mega-linter.yaml b/.github/workflows/mega-linter.yaml index 6dbb52d62..a928b5ea6 100644 --- a/.github/workflows/mega-linter.yaml +++ b/.github/workflows/mega-linter.yaml @@ -15,11 +15,18 @@ jobs: with: fetch-depth: 0 + - name: Generate Token + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 + id: generate-token + with: + app_id: "${{ secrets.BOT_APP_ID }}" + private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" + - name: MegaLinter uses: oxsecurity/megalinter/flavors/terraform@v7.6.0 env: VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}" # GITHUB_STATUS_REPORTER only works if VALIDATE_ALL_CODEBASE is false! GITHUB_STATUS_REPORTER: true REPORTERS_MARKDOWN_TYPE: simple