-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add Reusable GitHub Actions workflow #226
base: master
Are you sure you want to change the base?
Conversation
It's a good idea, but the |
@sy-records yeah that name was on the top of my head... Got ideas? |
Adds a new `reusable.yml` GitHub Actions workflow, that can be reused by the `doc-base` repo and individual `php/doc-*` repos. The new reusable workflow accepts inputs that control the repos it checks out, the name of the language, and other tasks that the `integration.yaml` file previously did. The new `build.yml` file then uses the `reusable.yml` workflow by passing parameters to run the same list of existing language builds. The advantage of this is that `doc-base` acts as the baseline GitHub Actions repo, and updates to it (such as changing the `runs-on` value, updating `uses` values for other actions such as `actions/checkout`, and other chores only need to be done on the `doc-base`, and not on every `php/doc-*` repo. Individual `php/doc-*` repos need to be updated to make use of the new reusable workflows, e.g.: ```yml name: "Build Ukrainian language documentation" on: push: pull_request: branches: "master" workflow_dispatch: jobs: build: uses: php/doc-base/.github/workflows/build-reusable.yml@master with: language: 'uk' ```
68d7858
to
f9df1ba
Compare
I changed the name from |
- "ja" | ||
- "pl" | ||
- "pt_br" | ||
# - "ro" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# - "ro" | |
# - "ro" |
LGTM.
Please, try to incorporate the changes They are necessary to avoid CI running on previous versions of master, as GitHub CI caches the target of merge commit on PR creation, and confusingly, only updates the target when the PR is changed. |
Adds a new
reusable.yml
GitHub Actions workflow, that can be reused by thedoc-base
repo and individualphp/doc-*
repos.The new reusable workflow accepts inputs that control the repos it checks out, the name of the language, and other tasks that the
integration.yaml
file previously did.The new
build.yml
file then uses thereusable.yml
workflow by passing parameters to run the same list of existing language builds.The advantage of this is that
doc-base
acts as the baseline GitHub Actions repo, and updates to it (such as changing theruns-on
value, updatinguses
values for other actions such asactions/checkout
, and other chores only need to be done on thedoc-base
, and not on everyphp/doc-*
repo.Individual
php/doc-*
repos need to be updated to make use of the new reusable workflows, e.g.: