From 8cbbf0ff58cedb5ff41bdb79f154fcb210295d91 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 2 Jan 2025 13:21:34 +0000 Subject: [PATCH] Update GitHub template files --- .github/workflows/deployment.yaml | 9 ++++++++- .github/workflows/labeler.yaml | 9 ++++++++- .github/workflows/publish.yaml | 9 ++++++++- .github/workflows/release.yaml | 9 ++++++++- .github/workflows/welcome-bot.yaml | 9 ++++++++- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index fa6e0ac..a723d0d 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -41,6 +41,13 @@ jobs: contents: write pull-requests: write steps: + - name: Generate GitHub App token + id: generate_token + uses: tibdex/github-app-token@v2.1.0 + with: + app_id: ${{ secrets.BOT_APP_ID }} + private_key: ${{ secrets.BOT_PRIVATE_KEY }} + - name: Checkout Repo uses: actions/checkout@v4 @@ -63,7 +70,7 @@ jobs: commit: "[ci] release" title: "[ci] release" env: - GITHUB_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} image-tag: diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index a432d18..162e678 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -9,10 +9,17 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: + - name: Generate GitHub App token + id: generate_token + uses: tibdex/github-app-token@v2.1.0 + with: + app_id: ${{ secrets.BOT_APP_ID }} + private_key: ${{ secrets.BOT_PRIVATE_KEY }} + - uses: actions/checkout@v4 - name: Ensure labels exist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} run: | gh label delete "bug" --yes || true gh label delete "documentation" --yes || true diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 10ab020..5ec3461 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -42,6 +42,13 @@ jobs: contents: write pull-requests: write steps: + - name: Generate GitHub App token + id: generate_token + uses: tibdex/github-app-token@v2.1.0 + with: + app_id: ${{ secrets.BOT_APP_ID }} + private_key: ${{ secrets.BOT_PRIVATE_KEY }} + - name: Checkout Repo uses: actions/checkout@v4 @@ -64,7 +71,7 @@ jobs: commit: "[ci] release" title: "[ci] release" env: - GITHUB_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} image-tag: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bf249b5..4d626ae 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,6 +13,13 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: + - name: Generate GitHub App token + id: generate_token + uses: tibdex/github-app-token@v2.1.0 + with: + app_id: ${{ secrets.BOT_APP_ID }} + private_key: ${{ secrets.BOT_PRIVATE_KEY }} + - name: Checkout Repo uses: actions/checkout@v4 with: @@ -37,4 +44,4 @@ jobs: commit: "[ci] release" title: "[ci] release" env: - GITHUB_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token}} diff --git a/.github/workflows/welcome-bot.yaml b/.github/workflows/welcome-bot.yaml index 19b53ba..6bdd228 100644 --- a/.github/workflows/welcome-bot.yaml +++ b/.github/workflows/welcome-bot.yaml @@ -13,6 +13,13 @@ jobs: name: Welcome First-Time Contributors runs-on: ubuntu-latest steps: + - name: Generate GitHub App token + id: generate_token + uses: tibdex/github-app-token@v2.1.0 + with: + app_id: ${{ secrets.BOT_APP_ID }} + private_key: ${{ secrets.BOT_PRIVATE_KEY }} + - uses: actions/checkout@v4 - name: Convert Repository Name to Title Case id: convert_repo_name @@ -22,7 +29,7 @@ jobs: echo "title_case_repo_name=$TITLE_CASE_REPO_NAME" >> $GITHUB_ENV - uses: zephyrproject-rtos/action-first-interaction@7e6446f8439d8b4399169880c36a3a12b5747699 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ steps.generate_token.outputs.token }} pr-opened-message: | Hello! Thank you for opening your **first PR** to ${{ env.title_case_repo_name }}! ✨