From fbeaa67f7d75a6f2c35c77a5e17bf129360aed17 Mon Sep 17 00:00:00 2001 From: Bernd Schorgers Date: Sat, 2 Dec 2023 12:11:35 +0100 Subject: [PATCH] ci: Use official GH action for app token --- .github/workflows/charts-release-ghpages.yaml | 16 ++++++++-------- .github/workflows/docs-release.yaml | 14 +++++++------- .github/workflows/tag-charts.yaml | 12 ++++++------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/charts-release-ghpages.yaml b/.github/workflows/charts-release-ghpages.yaml index cc438199..6fa79de1 100644 --- a/.github/workflows/charts-release-ghpages.yaml +++ b/.github/workflows/charts-release-ghpages.yaml @@ -24,24 +24,24 @@ jobs: name: Release charts runs-on: ubuntu-22.04 steps: - - name: Get GitHub API token - id: get-app-token - uses: getsentry/action-github-app-token@v2 + - name: "Generate Short Lived OAuth App Token (ghs_*)" + uses: actions/create-github-app-token@v1.6.1 + id: app-token with: - app_id: ${{ secrets.BJWS_APP_ID }} - private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }} + app-id: "${{ secrets.BJWS_APP_ID }}" + private-key: "${{ secrets.BJWS_APP_PRIVATE_KEY }}" - name: Checkout charts branch uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: - token: ${{ steps.get-app-token.outputs.token }} + token: ${{ steps.app-token.outputs.token }} path: "src" fetch-depth: 0 - name: Checkout gh-pages branch uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: - token: ${{ steps.get-app-token.outputs.token }} + token: ${{ steps.app-token.outputs.token }} path: "dest" ref: "gh-pages" fetch-depth: 0 @@ -91,6 +91,6 @@ jobs: if: ${{ steps.auto-commit.outputs.changes_detected }} id: wait-for-deploy with: - token: ${{ steps.get-app-token.outputs.token }} + token: ${{ steps.app-token.outputs.token }} ref: ${{ steps.auto-commit.outputs.commit_hash }} checkName: deploy diff --git a/.github/workflows/docs-release.yaml b/.github/workflows/docs-release.yaml index 6211e7be..f5aef49d 100644 --- a/.github/workflows/docs-release.yaml +++ b/.github/workflows/docs-release.yaml @@ -20,17 +20,17 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.ref }} steps: - - name: Get GitHub API token - id: get-app-token - uses: getsentry/action-github-app-token@v2 + - name: "Generate Short Lived OAuth App Token (ghs_*)" + uses: actions/create-github-app-token@v1.6.1 + id: app-token with: - app_id: ${{ secrets.BJWS_APP_ID }} - private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }} + app-id: "${{ secrets.BJWS_APP_ID }}" + private-key: "${{ secrets.BJWS_APP_PRIVATE_KEY }}" - name: Checkout main branch uses: actions/checkout@v4 with: - token: ${{ steps.get-app-token.outputs.token }} + token: ${{ steps.app-token.outputs.token }} fetch-depth: 0 - uses: actions/setup-python@v4 @@ -47,7 +47,7 @@ jobs: uses: peaceiris/actions-gh-pages@v3.9.3 if: ${{ github.ref == 'refs/heads/main' }} with: - github_token: ${{ steps.get-app-token.outputs.token }} + github_token: ${{ steps.app-token.outputs.token }} publish_dir: ./site destination_dir: docs user_name: "bjw-s-bot[bot]" diff --git a/.github/workflows/tag-charts.yaml b/.github/workflows/tag-charts.yaml index f2372632..2649d332 100644 --- a/.github/workflows/tag-charts.yaml +++ b/.github/workflows/tag-charts.yaml @@ -24,17 +24,17 @@ jobs: name: Tag charts runs-on: ubuntu-22.04 steps: - - name: Get GitHub API token - id: get-app-token - uses: getsentry/action-github-app-token@v2 + - name: "Generate Short Lived OAuth App Token (ghs_*)" + uses: actions/create-github-app-token@v1.6.1 + id: app-token with: - app_id: ${{ secrets.BJWS_APP_ID }} - private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }} + app-id: "${{ secrets.BJWS_APP_ID }}" + private-key: "${{ secrets.BJWS_APP_PRIVATE_KEY }}" - name: Checkout chart sources uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: - token: ${{ steps.get-app-token.outputs.token }} + token: ${{ steps.app-token.outputs.token }} fetch-depth: 0 - name: Create git tag for charts