From 8255389e2dafcd3d08add9ff58ec11cbeab569d1 Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Sat, 25 May 2024 18:35:55 +0100 Subject: [PATCH] ci: use official create-github-app-token (#1275) --- .github/workflows/build.yml | 2 +- .github/workflows/release-v4.yml | 6 +++--- .github/workflows/release.yml | 6 +++--- .github/workflows/upgrade-v4.yml | 2 +- .github/workflows/upgrade-v5.yml | 2 +- .projenrc.ts | 2 ++ projenrc/ReleaseBranches.ts | 6 +++--- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bc06f73..c6f50655 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: steps: - name: Generate token id: generate_token - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a + uses: actions/create-github-app-token@v1 with: app_id: ${{ secrets.PROJEN_APP_ID }} private_key: ${{ secrets.PROJEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/release-v4.yml b/.github/workflows/release-v4.yml index da0ff235..87cfbd42 100644 --- a/.github/workflows/release-v4.yml +++ b/.github/workflows/release-v4.yml @@ -18,10 +18,10 @@ jobs: steps: - name: Generate token id: generate_token - uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c + uses: actions/create-github-app-token@v1 with: - app_id: ${{ secrets.PROJEN_APP_ID }} - private_key: " ${{ secrets.PROJEN_APP_PRIVATE_KEY }}" + app-id: ${{ secrets.PROJEN_APP_ID }} + private-key: " ${{ secrets.PROJEN_APP_PRIVATE_KEY }}" - name: Checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 858ded2b..6d93a3c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,10 +18,10 @@ jobs: steps: - name: Generate token id: generate_token - uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c + uses: actions/create-github-app-token@v1 with: - app_id: ${{ secrets.PROJEN_APP_ID }} - private_key: " ${{ secrets.PROJEN_APP_PRIVATE_KEY }}" + app-id: ${{ secrets.PROJEN_APP_ID }} + private-key: " ${{ secrets.PROJEN_APP_PRIVATE_KEY }}" - name: Checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/upgrade-v4.yml b/.github/workflows/upgrade-v4.yml index 6740ca90..081d5974 100644 --- a/.github/workflows/upgrade-v4.yml +++ b/.github/workflows/upgrade-v4.yml @@ -49,7 +49,7 @@ jobs: steps: - name: Generate token id: generate_token - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a + uses: actions/create-github-app-token@v1 with: app_id: ${{ secrets.PROJEN_APP_ID }} private_key: ${{ secrets.PROJEN_APP_PRIVATE_KEY }} diff --git a/.github/workflows/upgrade-v5.yml b/.github/workflows/upgrade-v5.yml index f7a181a3..9c419421 100644 --- a/.github/workflows/upgrade-v5.yml +++ b/.github/workflows/upgrade-v5.yml @@ -49,7 +49,7 @@ jobs: steps: - name: Generate token id: generate_token - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a + uses: actions/create-github-app-token@v1 with: app_id: ${{ secrets.PROJEN_APP_ID }} private_key: ${{ secrets.PROJEN_APP_PRIVATE_KEY }} diff --git a/.projenrc.ts b/.projenrc.ts index ee11288c..6805260e 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -333,6 +333,8 @@ new TypeScriptSourceFile(project, 'src/esbuild-types.ts', { }, }); +// Use official github-app-token action +project.github?.actions.set('tibdex/github-app-token', 'actions/create-github-app-token@v1'); // Synth project project.synth(); diff --git a/projenrc/ReleaseBranches.ts b/projenrc/ReleaseBranches.ts index e9895115..32588f13 100644 --- a/projenrc/ReleaseBranches.ts +++ b/projenrc/ReleaseBranches.ts @@ -64,10 +64,10 @@ export class StableReleases { JsonPatch.add('/jobs/release/steps/0', { name: 'Generate token', id: 'generate_token', - uses: 'tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c', + uses: 'actions/create-github-app-token@v1', with: { - app_id: '${{ secrets.PROJEN_APP_ID }}', - private_key: ' ${{ secrets.PROJEN_APP_PRIVATE_KEY }}', + 'app-id': '${{ secrets.PROJEN_APP_ID }}', + 'private-key': ' ${{ secrets.PROJEN_APP_PRIVATE_KEY }}', }, }), JsonPatch.add('/jobs/release/steps/1/with/token', '${{ steps.generate_token.outputs.token }}'),