From 847bca3d8c9eae0e862a9f701445375bea00684e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Fri, 24 May 2024 12:33:36 +0100 Subject: [PATCH] ci: Use hugrbot in automation (#360) Uses @hugrbot's token in CI, so messages and tokens are created with its username. --- .github/workflows/pr-title.yml | 4 ++++ .github/workflows/release-please.yml | 2 +- .github/workflows/release-plz.yml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 3cd9a8b4..8f640b44 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -118,6 +118,7 @@ jobs: It looks like your proposed title indicates a breaking change. If that's the case, please make sure to include a "BREAKING CHANGE:" footer in the body of the pull request describing the breaking change and any migration instructions. + GITHUB_TOKEN: ${{ secrets.HUGRBOT_PAT }} - name: Fail if the footer is required but missing if: ${{ steps.breaking.outputs.breaking == 'true' && steps.breaking.outputs.has_breaking_footer == 'false' }} run: exit 1 @@ -150,6 +151,8 @@ jobs: ``` ${{ steps.lint_pr_title.outputs.error_message }} ``` + GITHUB_TOKEN: ${{ secrets.HUGRBOT_PAT }} + # Delete previous comments when the issues have been resolved # This step doesn't run if any of the previous checks fails. @@ -158,3 +161,4 @@ jobs: with: header: pr-title-lint-error delete: true + GITHUB_TOKEN: ${{ secrets.HUGRBOT_PAT }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 4b8fe096..16534f14 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -19,5 +19,5 @@ jobs: - uses: googleapis/release-please-action@v4 with: # Using a personal access token so releases created by this workflow can trigger the deployment workflow - token: ${{ secrets.RELEASE_PLEASE_PAT }} + token: ${{ secrets.HUGRBOT_PAT }} config-file: release-please-config.json diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml index 8b724ff7..9b1d2b53 100644 --- a/.github/workflows/release-plz.yml +++ b/.github/workflows/release-plz.yml @@ -24,5 +24,5 @@ jobs: - name: Run release-plz uses: MarcoIeni/release-plz-action@v0.5 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.HUGRBOT_PAT }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}