Create a GHA reusable workflow rather than cloning the gha dist everywhere
Opened this issue · 2 comments
Every time there are changes to the gha.dist.yml we have to copy it across 50 repos and reconcile the repo specific config (matrix, additional plugins) with the template. It's quite a faff to have to keep doing
https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml
I wonder wether we could move this around so there is a github actions reusable workflow in the moodle-plugin-ci repo that is kept up to date within here, and in our plugin repos we can just call this reusable workflow, while having the matrix & additional plugins specifically setup thus effortlessly always keeping up to date with all of the improvements to moodle-plugin-ci
Happy to work on it if there is appetite for a pull request.
Hi @aspark21, that is great suggestion. It would be good to have it as GH action, so PR is welcomed :)
For inspiration, this is a snippet by @andrewnicols outlining how this may look like:
- name: Plugin CI Checks
uses: moodlehq/moodle-plugin-ci@v3
with:
moodle-branch: ${{ matrix.moodle-branch }}
DB: ${{ matrix.database }}
# All tests are run by default unless otherwise specified, for example:
lint: false
# Or arguments may be specified, for example:
phpmd:
args: --max-warnings 0
behat:
profile: chrome
suite: classic