Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Allow to Pass Custom Git Actor to flarum/action-build #4078

Draft
wants to merge 4 commits into
base: 1.x
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/REUSABLE_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,25 @@ 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.
required: false
composer_auth:
description: The Composer auth tokens to use for private packages.
required: false
git_actor_token:
description: The personal access token from the custom git actor.
required: false

env:
COMPOSER_ROOT_VERSION: dev-main
Expand All @@ -111,13 +123,18 @@ 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')

steps:
- name: Check out code
uses: actions/checkout@v4
with:
token: ${{ secrets.git_actor_token != '' && secrets.git_actor_token || secrets.GITHUB_TOKEN }}

- name: Set up Node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -155,6 +172,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 }}
Expand Down
Loading