From c8106ed9f2a52302c7cd9e023af5bc9a1f3ac8a4 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 19 Mar 2025 12:48:44 +0100 Subject: [PATCH] devops: migrate to GitHub App for automation --- .github/workflows/trigger_internal_tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trigger_internal_tests.yml b/.github/workflows/trigger_internal_tests.yml index 8af0dff2a..bed8f0d72 100644 --- a/.github/workflows/trigger_internal_tests.yml +++ b/.github/workflows/trigger_internal_tests.yml @@ -11,11 +11,17 @@ jobs: name: "trigger" runs-on: ubuntu-24.04 steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.PLAYWRIGHT_APP_ID }} + private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }} + repositories: playwright-browsers - run: | - curl -X POST \ + curl -X POST --fail \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token ${GH_TOKEN}" \ --data "{\"event_type\": \"playwright_tests_java\", \"client_payload\": {\"ref\": \"${GITHUB_SHA}\"}}" \ https://api.github.com/repos/microsoft/playwright-browsers/dispatches env: - GH_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} + GH_TOKEN: ${{ steps.app-token.outputs.token }}