github-reusable-workflows
On this page
Code
When every repository copies the same release and delivery workflow, a fix to one has to be repeated in all of them. github-reusable-workflows keeps these workflows in one place, made for Bruno’s open-source repositories: one fix, one new tag, and each repository moves up to it when it wants. Anyone who uses them pins a tag (@vX.Y.Z).
The flow
The calling repository picks the workflow and the tag in uses:. A fix made here becomes a new tag, and each repository that uses it moves up in its own pull request.
What it does
release-please.yml: keeps the release pull request up to date; when it is merged, thevX.Y.Ztag and the GitHub release are created.pr-title.yml: fails a pull request whose title is not a Conventional Commit, since the squash merge turns the title into the commit that release-please reads.mulesoft-library.yml: build on the pull request and, on merge, the Maven release published to Exchange.mulesoft-app.yml:mainto TEST,release/X.Y.Zto UAT, the tag to PROD with approval, and the back-merge.mulesoft-deploy.ymlis called only by it.
The MuleSoft workflows do not run MUnit; the reason and the setup are in mulesoft/README.md.
Getting started
In the calling repository, release-please needs release-please-config.json, .release-please-manifest.json, a GitHub App of its own for releases and the release-please environment. The pull request title is the simplest part, but it needs the squash merge to use the title as the commit message and pr-title / conventional-commit to be a required check:
name: Title
on:
pull_request:
types: [opened, edited, synchronize, reopened]
permissions: {}
jobs:
pr-title:
uses: brunosouzas/github-reusable-workflows/.github/workflows/pr-title.yml@v0.1.0