mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
[1.x] Allow to Pass Custom Git Actor to flarum/action-build
(#4078)
* feat: allow to pass custom git actor to `action-build` * fix: spelling * chore * chore: remove unused input * chore: bump flarum/action-build
This commit is contained in:
22
.github/workflows/REUSABLE_frontend.yml
vendored
22
.github/workflows/REUSABLE_frontend.yml
vendored
@@ -92,6 +92,15 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: 'ubuntu-latest'
|
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:
|
secrets:
|
||||||
bundlewatch_github_token:
|
bundlewatch_github_token:
|
||||||
description: The GitHub token to use for Bundlewatch.
|
description: The GitHub token to use for Bundlewatch.
|
||||||
@@ -99,6 +108,9 @@ on:
|
|||||||
composer_auth:
|
composer_auth:
|
||||||
description: The Composer auth tokens to use for private packages.
|
description: The Composer auth tokens to use for private packages.
|
||||||
required: false
|
required: false
|
||||||
|
git_actor_token:
|
||||||
|
description: The personal access token from the custom git actor.
|
||||||
|
required: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
COMPOSER_ROOT_VERSION: dev-main
|
COMPOSER_ROOT_VERSION: dev-main
|
||||||
@@ -111,6 +123,9 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Checks & Build
|
name: Checks & Build
|
||||||
runs-on: ${{ inputs.runner_type }}
|
runs-on: ${{ inputs.runner_type }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GIT_ACTOR_TOKEN: ${{ secrets.git_actor_token }}
|
||||||
|
|
||||||
if: >-
|
if: >-
|
||||||
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
|
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
|
||||||
@@ -118,6 +133,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.git_actor_token != '' && secrets.git_actor_token || secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -143,9 +160,8 @@ jobs:
|
|||||||
working-directory: ${{ inputs.frontend_directory }}
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
- name: JS Checks & Production Build
|
- name: JS Checks & Production Build
|
||||||
uses: flarum/action-build@v4
|
uses: flarum/action-build@v4.1
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
build_script: ${{ inputs.build_script }}
|
build_script: ${{ inputs.build_script }}
|
||||||
build_typings_script: ${{ inputs.build_typings_script }}
|
build_typings_script: ${{ inputs.build_typings_script }}
|
||||||
format_script: ${{ inputs.enable_prettier == true && inputs.format_script || '' }}
|
format_script: ${{ inputs.enable_prettier == true && inputs.format_script || '' }}
|
||||||
@@ -155,6 +171,8 @@ jobs:
|
|||||||
package_manager: ${{ inputs.js_package_manager }}
|
package_manager: ${{ inputs.js_package_manager }}
|
||||||
js_path: ${{ inputs.frontend_directory }}
|
js_path: ${{ inputs.frontend_directory }}
|
||||||
do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }}
|
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
|
- name: Check bundle size change
|
||||||
if: ${{ inputs.enable_bundlewatch }}
|
if: ${{ inputs.enable_bundlewatch }}
|
||||||
|
Reference in New Issue
Block a user