flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.23k stars 830 forks source link

ci: allow custom actions runner to be defined #3987

Closed DavideIadeluca closed 1 month ago

DavideIadeluca commented 1 month ago

Fixes #0000

Changes proposed in this pull request: Allow custom GitHub Actions runner to be defined in the reusable frontend & backend workflows. This allows third-party vendors to optionally pass a new input runner_type which specifies on which machine the jobs are being run (be it a custom GitHub-hosted runner or a self-hosted one).

Hypothetical example of a calling workflow:

name: ACME Foobar PHP

on: [workflow_dispatch, push, pull_request]

jobs:
  run:
    uses: flarum/framework/.github/workflows/REUSABLE_backend.yml@2.x
    with:
      enable_backend_testing: true
      enable_phpstan: true
      php_versions: '["8.0", "8.1", "8.2", "8.3"]'
      runner_type: self-hosted

      backend_directory: . 

It's important to note that this new input is optional and will default to ubuntu-latest if not defined by the calling workflow.

Reviewers should focus on:

Screenshot

QA

Necessity

Confirmed

Required changes:

DavideIadeluca commented 1 month ago

If you are okay with this change, I'm happy to open the same PR against 1.x.

SychO9 commented 1 month ago

Thanks for the PR! could you please remove the dist files from the PR, maybe if you branch off the commit in question from your main(2.x) branch to prevent github actions from generating dist files.

Feel free to PR to 1.x as well.

DavideIadeluca commented 1 month ago

Superseded by #3988