diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index e35049d5..d08efebf 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -29,6 +29,13 @@ jobs: name: Create Release PR runs-on: ubuntu-latest steps: + - name: Generate release app token + id: app-token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 + with: + client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -38,7 +45,7 @@ jobs: with: releaseo_version: v0.0.3 bump_type: ${{ inputs.bump_type }} - token: ${{ secrets.RELEASE_TOKEN }} + token: ${{ steps.app-token.outputs.token }} version_files: | - file: helm/Chart.yaml path: version diff --git a/.github/workflows/create-release-tag.yml b/.github/workflows/create-release-tag.yml index bf0805c4..e6687029 100644 --- a/.github/workflows/create-release-tag.yml +++ b/.github/workflows/create-release-tag.yml @@ -27,6 +27,13 @@ jobs: create-tag: runs-on: ubuntu-latest steps: + - name: Generate release app token + id: app-token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 + with: + client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -126,13 +133,14 @@ jobs: echo "Created and pushed tag: $TAG" # Create GitHub Release (triggers docker-publish.yml and releaser-helm-chart.yml) - # Note: Must use PAT (GH_TOKEN) because GITHUB_TOKEN cannot trigger other workflows + # Note: Uses a GitHub App installation token rather than GITHUB_TOKEN, + # because events from GITHUB_TOKEN cannot trigger downstream workflows. gh release create "$TAG" \ --title "Release $TAG" \ --generate-notes echo "Created GitHub Release: $TAG" env: - GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} + GH_TOKEN: ${{ steps.app-token.outputs.token }} - name: Summary run: |