The github actions in this repo are used in several projects.
The projects mentioned in README.md are considered critical users of this repo. When introducing a change in this repo, care should be taken to check that those changes will not break the CI process of the critical users.
To submit a change please follow the guidelines described below.
The syntax for using a public action in a subdirectory is as follows (reference):
uses: {owner}/{repo}/{path}@{ref}
For example:
uses: mfem/github-actions/[email protected]
{ref}
can be any of the following:
- branch (recommended for development)
- tag (recommended for final version)
- commit hash
To submit a change please follow these guidelines. Because this involves making changes in multiple repos, each step will be marked with the repo it is referencing:
actions
refers to making a change in this repo:mfem/github-actions
project
refers to making a change in the repo with a workflow invoking an action, e.g. one of the projects mentioned in README.md
actions
Create a branch frommaster
with a descriptive name, e.g.add-single-precision-ci
actions
Make updates to actions and push changesproject
Create a new branch and in that branch, change{ref}
in the workflows you'd like to test so that it points to your feature branch, e.g.
mfem/.github/workflows/build-and-tests.yml
- uses: mfem/github-actions/[email protected] + uses: mfem/github-actions/build-mfem@add-single-precision-ci
project
To test the updated workflow, create a pull request and label it withDO-NOT-MERGE
; this will trigger the CI to run with your new changes
Note
Adding an option to use manually trigger can be useful for debugging. This can be done by adding
workflow_dispatch
to the list of triggerson: workflow_dispatch
The option to manually trigger will not appear until the workflow has previously been triggered via something like a PR or push.
-
actions
Continue to develop and test your action; because the{ref}
in yourproject
workflow is pointing to your branch, re-running theproject
CI will always point to the latest commit. -
actions
Once your changes are finalized- Update
CHANGELOG.md
to reflect your changes, using an appropriate updated version number - Submit a PR to pull your branch into
master
- Once the PR is merged, tag the merged commit with the new version number
- Update
-
project
Update the{ref}
in your actions to point to the new tag (version number), e.g.
mfem/.github/workflows/build-and-tests.yml
- uses: mfem/github-actions/build-mfem@add-single-precision-ci + uses: mfem/github-actions/[email protected]
Note
These guidelines recommend setting
{ref}
to your branch during development - as they are a moving target and make it easier to rapidly test each new commit. However, once changes are finalized{ref}
points to a tag for stability.
project
Remove theDO-NOT-MERGE
label from your PR and complete the merge.project
If job names have changed, contact a MFEM Editor to ensure that the correct names are used in the required tests. (Example)- Celebrate! 🕺💃🎉
- When adding a new input to an action, you may want to also add a new dimension to the job matrix for workflows that use that action. If you are adding a dimension to a job matrix, the job name may also need to be modified as job names must be unique.