This repository contains action and workflow definitions which can be used across Human Made projects to centralize and standardize our tooling and release processes.
The build-to-release-branch.yml action can be used to compile a source branch into a target releasable branch, committing any built assets which are normally gitignore'd. This release branch can then be tagged for a formalized NPM or Packagist release, or else tracked in composer as a VCS reference.
The resolve-composer-lock-conflict action automatically resolves composer.lock content-hash merge conflicts in pull requests. When two branches independently update composer.json, the content-hash in composer.lock diverges. This action detects that situation, regenerates the hash from the resolved composer.json, and pushes a merge commit to the PR branch. It exits without modifying the branch if composer.json is also conflicted, if there are package-level conflicts in composer.lock, or if the PR comes from a fork.
The sync-branches action creates a companion sync branch from a labeled pull request and opens a second pull request proposing to merge it into a target environment branch (e.g. dev, staging). Ported from humanmade/sync-branches.
This workflow simplifies installing Node.js dependencies, then building them to a target branch. It composes the actions/checkout, actions/setup-node, and our custom build-to-release-branch actions.
Example usage:
name: Production Release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
release:
name: "Update release branch"
uses: humanmade/hm-github-actions/.github/workflows/build-and-release-node.yml@fabf2b583b046cca2cccffa99d5a3cd83c487e4f # v0.3.0
with:
node_version: 24
source_branch: main
release_branch: release
built_asset_paths: build
build_script: |
npm ci
npm run buildSee .github/workflows/build-and-release-node-basic.yml for full usage instructions.
This workflow simplifies resolving composer.lock content-hash conflicts in pull requests by setting up PHP and Composer, then calling the resolve-composer-lock-conflict action.
Example usage:
name: Resolve composer.lock conflict
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
resolve-lock:
name: "Resolve composer.lock content-hash conflict"
uses: humanmade/hm-github-actions/.github/workflows/resolve-composer-lock-conflict.yml@fabf2b583b046cca2cccffa99d5a3cd83c487e4f # v0.3.0
with:
base_branch: ${{ github.base_ref }}
head_branch: ${{ github.head_ref }}
permissions:
contents: writeSee .github/workflows/resolve-composer-lock-conflict.yml for full usage instructions.