From 332347392f899902d321de82ce4e4f76f479c016 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Fri, 18 Oct 2024 11:41:21 +0200 Subject: [PATCH 1/3] feat: allow to pass custom git actor to `action-build` --- .github/workflows/REUSABLE_frontend.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/REUSABLE_frontend.yml b/.github/workflows/REUSABLE_frontend.yml index f6a9d7d1bb..7d8022f620 100644 --- a/.github/workflows/REUSABLE_frontend.yml +++ b/.github/workflows/REUSABLE_frontend.yml @@ -92,6 +92,15 @@ on: required: false default: 'ubuntu-latest' + git_actor_name: + description: The name of the git actor to use for the bundled JS output. + type: string + required: false + git_actor_email: + description: The email of the git actor to use for the bundled JS output. + type: string + required: false + secrets: bundlewatch_github_token: description: The GitHub token to use for Bundlewatch. @@ -99,6 +108,9 @@ on: composer_auth: description: The Composer auth tokens to use for private packages. required: false + git_actor_token: + description: The Personal Access Token forthe git actor. + required: false env: COMPOSER_ROOT_VERSION: dev-main @@ -110,6 +122,9 @@ jobs: build: name: Checks & Build runs-on: ${{ inputs.runner_type }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_ACTOR_TOKEN: ${{ secrets.git_actor_token }} if: >- ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request') @@ -117,6 +132,8 @@ jobs: steps: - name: Check out code uses: actions/checkout@v3 + with: + token: ${{ secrets.git_actor_token != '' && secrets.git_actor_token || secrets.GITHUB_TOKEN }} - name: Set up Node uses: actions/setup-node@v3 @@ -154,6 +171,8 @@ jobs: package_manager: ${{ inputs.js_package_manager }} js_path: ${{ inputs.frontend_directory }} do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }} + git_actor_name: ${{ inputs.git_actor_name || '' }} + git_actor_email: ${{ inputs.git_actor_email || '' }} - name: Check bundle size change if: ${{ inputs.enable_bundlewatch }} From 19c6480ceac12cc3bf81977f1990e73c84c47209 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Fri, 18 Oct 2024 15:52:45 +0200 Subject: [PATCH 2/3] fix: spelling --- .github/workflows/REUSABLE_frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/REUSABLE_frontend.yml b/.github/workflows/REUSABLE_frontend.yml index 7d8022f620..818e012235 100644 --- a/.github/workflows/REUSABLE_frontend.yml +++ b/.github/workflows/REUSABLE_frontend.yml @@ -109,7 +109,7 @@ on: description: The Composer auth tokens to use for private packages. required: false git_actor_token: - description: The Personal Access Token forthe git actor. + description: The personal access token for the custom git actor. required: false env: From 80e0c4c5469967603e2c7e4cdb53575941fc3631 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sat, 19 Oct 2024 18:34:05 +0200 Subject: [PATCH 3/3] chore --- .github/workflows/REUSABLE_frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/REUSABLE_frontend.yml b/.github/workflows/REUSABLE_frontend.yml index 818e012235..f0f39b5237 100644 --- a/.github/workflows/REUSABLE_frontend.yml +++ b/.github/workflows/REUSABLE_frontend.yml @@ -109,7 +109,7 @@ on: description: The Composer auth tokens to use for private packages. required: false git_actor_token: - description: The personal access token for the custom git actor. + description: The personal access token from the custom git actor. required: false env: