From 9972d28251c7325b58c323b3268ec28a0959df34 Mon Sep 17 00:00:00 2001 From: Darren Temple Date: Tue, 15 Apr 2025 15:21:13 +0100 Subject: [PATCH 1/2] chore: Replace personal access token with GitHub App Token --- .github/workflows/publish-to-npm.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml index f02db902..51fc570a 100644 --- a/.github/workflows/publish-to-npm.yml +++ b/.github/workflows/publish-to-npm.yml @@ -10,10 +10,16 @@ jobs: if: ${{ !contains(github.event.head_commit.author.email, 'openactive-bot@users.noreply.github.com') }} steps: + - name: Generate GitHub App Token + uses: actions/create-github-app-token@v1 + id: generate-token + with: + app-id: ${{ secrets.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - name: Checkout uses: actions/checkout@v2 with: - token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} - name: Identify run: | git config user.name openactive-bot @@ -43,9 +49,15 @@ jobs: repo: ['OpenActive.NET', 'OpenActive.DatasetSite.NET', 'models-php', 'models-ruby', 'models-ts', 'data-model-validator-site', 'openactive.github.io', 'developer-documentation', 'openactive-test-suite'] runs-on: ubuntu-latest steps: + - name: Generate GitHub App Token + uses: actions/create-github-app-token@v1 + id: generate-token + with: + app-id: ${{ secrets.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - name: Trigger tooling update uses: peter-evans/repository-dispatch@v1 with: - token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} repository: openactive/${{ matrix.repo }} event-type: data-models-update From 463afb66758a2be528c9af7ddbd67cf2c15c289b Mon Sep 17 00:00:00 2001 From: Darren Temple Date: Tue, 27 May 2025 14:26:53 +0100 Subject: [PATCH 2/2] Update actions --- .github/workflows/npm-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-test.yml b/.github/workflows/npm-test.yml index c661ff6a..2f47c522 100644 --- a/.github/workflows/npm-test.yml +++ b/.github/workflows/npm-test.yml @@ -10,9 +10,9 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use Node.js 18.17.1 - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 18.17.1 - name: Install