This project provides community health files and composite actions for the @ergebnis organization.
This project provides the following composite actions:
ergebnis/.github/actions/composer/determine-cache-directoryergebnis/.github/actions/composer/determine-root-versionergebnis/.github/actions/composer/installergebnis/.github/actions/github/pull-request/add-assigneeergebnis/.github/actions/github/pull-request/add-label-based-on-branch-nameergebnis/.github/actions/github/pull-request/approveergebnis/.github/actions/github/pull-request/mergeergebnis/.github/actions/github/pull-request/request-reviewergebnis/.github/actions/github/release/createergebnis/.github/actions/github/release/publishergebnis/.github/actions/oh-dear/check/request-runergebnis/.github/actions/oh-dear/maintenance-period/startergebnis/.github/actions/oh-dear/maintenance-period/stopergebnis/.github/actions/phive/install
This action determines the cache directory for composer and exports it as COMPOSER_CACHE_DIR environment variable.
This is useful for caching dependencies installed with composer using actions/cache.
name: "Integrate"
on:
pull_request: null
push:
branches:
- "main"
jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v5.0.0"
- name: "Set up PHP"
uses: "shivammathur/setup-php@2.35.4"
with:
coverage: "none"
php-version: "8.1"
- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.9.3"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v4.2.4"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "composer-${{ hashFiles('composer.lock') }}"
restore-keys: "composer-"For details, see actions/composer/determine-cache-directory/action.yaml.
working-directory, optional: The working directory to use. Defaults to".".
none
- The
COMPOSER_CACHE_DIRenvironment variable contains the path to the composer cache directory.
This action determines the composer root version and exports it as COMPOSER_ROOT_VERSION environment variable.
This is useful for a package that depends on itself, for example, phpunit/phpunit
name: "Integrate"
on:
pull_request: null
push:
branches:
- "main"
jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v5.0.0"
- name: "Set up PHP"
uses: "shivammathur/setup-php@2.35.4"
with:
coverage: "none"
php-version: "8.1"
- name: "Determine composer root version"
uses: "ergebnis/.github/actions/composer/determine-root-version@1.9.3"For details, see actions/composer/determine-root-version/action.yaml.
branch, optional: The name of the branch, defaults to"main".working-directory, optional: The working directory to use, defaults to".".
none
-
The
COMPOSER_ROOT_VERSIONenvironment variable contains the root version if it has been defined asbranch-aliasincomposer.json.{ "extra": { "branch-alias": { "dev-main": "10.0-dev" } } }
This action installs or updates dependencies with composer.
name: "Integrate"
on:
pull_request: null
push:
branches:
- "main"
jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
dependencies:
- "lowest"
- "locked"
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v5.0.0"
- name: "Set up PHP"
uses: "shivammathur/setup-php@2.35.4"
with:
coverage: "none"
php-version: "8.1"
- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.9.3"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v4.2.4"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "composer-${{ matrix.dependencies }}-"
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "ergebnis/.github/actions/composer/install@1.9.3"
with:
dependencies: "${{ matrix.dependencies }}"For details, see actions/composer/install/action.yaml.
dependencies, optional: Which dependencies to install, one of"lowest","locked","highest"working-directory, optional: The working directory to use, defaults to".".
none
-
When
dependenciesis set to"lowest", dependencies are installed in the directory specified byworking-directorywithcomposer update --ansi --no-interaction --no-progress --prefer-lowest
-
When
dependenciesis set to"locked", dependencies are installed in the directory specified byworking-directorywithcomposer install --ansi --no-interaction --no-progress
-
When
dependenciesis set to"highest", dependencies are installed in the directory specified byworking-directorywithcomposer update --ansi --no-interaction --no-progress
This action adds an assignee to a pull request.
This is useful when you want to automatically merge a pull request, but prefer to assign a bot user beforehand.
name: "Merge"
on:
workflow_run:
types:
- "completed"
workflows:
- "Integrate"
jobs:
merge:
name: "Merge"
runs-on: "ubuntu-latest"
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.actor == 'dependabot[bot]' && (
startsWith(github.event.workflow_run.head_commit.message, 'composer(deps-dev)') ||
startsWith(github.event.workflow_run.head_commit.message, 'github-actions(deps)')
)
steps:
- name: "Assign @ergebnis-bot"
uses: "ergebnis/.github/actions/github/pull-request/add-assignee@1.9.3"
with:
assignee: "ergebnis-bot"
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"For details, see actions/github/pull-request/add-assignee/action.yaml.
assignee, required: The username of a user to add as an assignee to a pull request.github-token, required: The GitHub token of a user with permission to add assignees to a pull request
none
- The GitHub user with the username specified in the
assigneeinput is assigned to the pull request. - The
PULL_REQUEST_NUMBERenvironment variable contains the number of the pull request.
This action adds a label to a pull request based on the name of the branch.
# https://docs.github.com/en/actions
name: "Triage"
on: # yamllint disable-line rule:truthy
pull_request_target:
types:
- "opened"
jobs:
label:
name: "Label"
runs-on: "ubuntu-latest"
steps:
- name: "Add labels based on branch name"
uses: "ergebnis/.github/actions/github/pull-request/add-label-based-on-branch-name@1.9.3"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"For details, see actions/github/pull-request/add-label-based-on-branch-name/action.yaml.
github-token, required: The GitHub token of a user with permission to add labels to to a pull request.
none
- When the branch name starts with
feature/, the labelenhancementis added to the pull request by the user who owns the GitHub token specified with thegithub-tokeninput. - When the branch name starts with
fix/, the labelbugis added to the pull request by the user who owns the GitHub token specified with thegithub-tokeninput. - The
PULL_REQUEST_BRANCH_NAMEenvironment variable contains the name of the head branch of the pull request. - The
PULL_REQUEST_NUMBERenvironment variable contains the number of the pull request.
This action approves a pull request.
This is useful when you want to automatically merge a pull request, but prefer to let a bot user approve the pull request beforehand.
name: "Merge"
on:
workflow_run:
types:
- "completed"
workflows:
- "Integrate"
jobs:
merge:
name: "Merge"
runs-on: "ubuntu-latest"
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.actor == 'dependabot[bot]' && (
startsWith(github.event.workflow_run.head_commit.message, 'composer(deps-dev)') ||
startsWith(github.event.workflow_run.head_commit.message, 'github-actions(deps)')
)
steps:
- name: "Approve pull request"
uses: "ergebnis/.github/actions/github/pull-request/approve@1.9.3"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"For details, see actions/github/pull-request/merge/action.yaml.
github-token, required: The GitHub token of a user with permission to approve a pull request
none
- The pull request is approved by the user who owns the GitHub token specified with the
github-tokeninput. - The
PULL_REQUEST_NUMBERenvironment variable contains the number of the pull request.
This action merges a pull request.
This is useful when you want to automatically merge a pull request, for example, opened by dependabot.
name: "Merge"
on:
workflow_run:
types:
- "completed"
workflows:
- "Integrate"
jobs:
merge:
name: "Merge"
runs-on: "ubuntu-latest"
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.actor == 'dependabot[bot]' && (
startsWith(github.event.workflow_run.head_commit.message, 'composer(deps-dev)') ||
startsWith(github.event.workflow_run.head_commit.message, 'github-actions(deps)')
)
steps:
- name: "Merge pull request"
uses: "ergebnis/.github/actions/github/pull-request/merge@1.9.3"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"For details, see actions/github/pull-request/merge/action.yaml.
github-token, required: The GitHub token of a user with permission to merge a pull requestmerge-method, option: The merge method to use, one"merge","rebase","squash", defaults to"merge"
none
- The pull request is merged by the user who owns the GitHub token specified with the
github-tokeninput. - The
PULL_REQUEST_NUMBERenvironment variable contains the number of the pull request.
This action requests a review for a pull request.
This is useful when you want to automatically merge a pull request, but prefer to let a bot user self-request a review for the pull request beforehand.
name: "Merge"
on:
workflow_run:
types:
- "completed"
workflows:
- "Integrate"
jobs:
merge:
name: "Merge"
runs-on: "ubuntu-latest"
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.actor == 'dependabot[bot]' && (
startsWith(github.event.workflow_run.head_commit.message, 'composer(deps-dev)') ||
startsWith(github.event.workflow_run.head_commit.message, 'github-actions(deps)')
)
steps:
- name: "Request review from @ergebnis-bot"
uses: "ergebnis/.github/actions/github/pull-request/request-review@1.9.3"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
reviewer: "ergebnis-bot"For details, see actions/github/pull-request/request-review/action.yaml.
github-token, required: The GitHub token of a user with permission to request reviewers for a pull request.reviewer, required: The username of user to request review from for a pull request.
none
- A pull request review is requested for the user identified by the value of the
reviewerinput by the user who owns the GitHub token specified with thegithub-tokeninput. - The
PULL_REQUEST_NUMBERenvironment variable contains the number of the pull request.
This action creates a release.
This is useful when you automatically want to create releases with automatically generated release notes.
name: "Release"
on:
push:
tags:
- "**"
jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
steps:
- name: "Create release"
uses: "ergebnis/.github/actions/github/release/create@1.9.3"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"For details, see actions/github/release/create/action.yaml.
draft, optional: Whether to create a draft or a published release.github-token, required: The GitHub token of a user with permission to create a release.
none
- A release is created by the user who owns the GitHub token specified with the
github-tokeninput. - The
RELEASE_HTML_URLenvironment variable contains the HTML URL to the release. - The
RELEASE_IDenvironment variable contains the release identifier. - The
RELEASE_TAGenvironment variable contains the release tag. - The
RELEASE_UPLOAD_URLenvironment variable contains the URL for uploading release assets.
This action publishes a release.
This is useful when you want to publish a release created in draft mode.
name: "Release"
on:
push:
tags:
- "**"
jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
steps:
- name: "Publish release"
uses: "ergebnis/.github/actions/github/release/publish@1.10.0"
with:
release-id: "9001"
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"For details, see actions/github/release/publish/action.yaml.
github-token, required: The GitHub token of a user with permission to create a release.release-id, required: The release identifier.
none
- The release identified by the release identifier is published by the user who owns the GitHub token specified with the
github-tokeninput.
This action requests a check run on Oh Dear!.
name: "Deploy"
on:
push:
branches:
- "main"
jobs:
deploy:
name: "Deploy"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v5.0.0"
with:
fetch-depth: 50
- name: "Request broken links check on ohdear.app"
uses: "ergebnis/.github/actions/oh-dear/maintenance-period/start@1.9.3"
with:
oh-dear-api-token: "${{ secrets.OH_DEAR_API_TOKEN }}"
oh-dear-check-id: "${{ secrets.OH_DEAR_BROKEN_LINKS_CHECK_ID }}"For details, see actions/oh-dear/check/request-run/action.yaml.
oh-dear-api-token, required: The Oh Dear API token of a user with permission to request a check runoh-dear-check-id, required: Check identifer of an Oh Dear check for which to request a run
none
- A check run is requested by the user who owns the Oh Dear API token specified with the
oh-dear-api-tokeninput for the check identified by theoh-dear-check-idinput.
This action starts a maintenance period on Oh Dear!.
name: "Deploy"
on:
push:
branches:
- "main"
jobs:
deploy:
name: "Deploy"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v5.0.0"
with:
fetch-depth: 50
- name: "Start maintenance period on ohdear.app"
uses: "ergebnis/.github/actions/oh-dear/maintenance-period/start@1.9.3"
with:
oh-dear-api-token: "${{ secrets.OH_DEAR_API_TOKEN }}"
oh-dear-site-id: "${{ secrets.OH_DEAR_SITE_ID }}"For details, see actions/oh-dear/maintenance-period/start/action.yaml.
oh-dear-api-token, required: The Oh Dear API token of a user with permission to start a maintenance periodoh-dear-site-id, required: Site identifer of an Oh Dear site for which to start a maintenance period
none
- A maintenance period is started by the user who owns the Oh Dear API token specified with the
oh-dear-api-tokeninput for the site identified by theoh-dear-site-idinput.
This action stops a maintenance period on Oh Dear!.
name: "Deploy"
on:
push:
branches:
- "main"
jobs:
deploy:
name: "Deploy"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v5.0.0"
with:
fetch-depth: 50
- name: "Stop maintenance period on ohdear.app"
uses: "ergebnis/.github/actions/oh-dear/maintenance-period/stop@1.9.3"
with:
oh-dear-api-token: "${{ secrets.OH_DEAR_API_TOKEN }}"
oh-dear-site-id: "${{ secrets.OH_DEAR_SITE_ID }}"For details, see actions/oh-dear/maintenance-period/stop/action.yaml.
oh-dear-api-token, required: The Oh Dear API token of a user with permission to stop a maintenance periodoh-dear-site-id, required: Site identifer of an Oh Dear site for which to stop a maintenance period
none
- A maintenance period is stopped by the user who owns the Oh Dear API token specified with the
oh-dear-api-tokeninput for the site identified by theoh-dear-site-idinput.
This action installs dependencies with phive.
name: "Integrate"
on:
pull_request: null
push:
branches:
- "main"
jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v5.0.0"
- name: "Set up PHP"
uses: "shivammathur/setup-php@2.35.4"
with:
coverage: "none"
php-version: "8.1"
tools: "phive"
- name: "Install dependencies with phive"
uses: "ergebnis/.github/actions/phive/install@1.9.3"
with:
trust-gpg-keys: "0x033E5F8D801A2F8D,0x2A8299CE842DD38C"For details, see actions/phive/install/action.yaml.
phive-home, optional: Which directory to use asPHIVE_HOMEdirectory, defaults to".build/phive".trust-gpg-keys, required: Which GPG keys to trust, a comma-separated list of trusted GPG keys
none
- Given that
phiveis available,phivecould find aphars.xml, and keys presented by packages are listed using thetrust-gpg-keysoption, dependencies are installed withphive.
The directory configured by the phive-home directory is cached using actions/cache.
The maintainers of this project record notable changes to this project in a changelog.
The maintainers of this project suggest following the contribution guide.
The maintainers of this project ask contributors to follow the code of conduct.
The maintainers of this project provide limited support.
You can support the maintenance of this project by sponsoring @ergebnis.
This project has a security policy.
This project uses the MIT license.
Follow @localheinz and @ergebnis on Twitter.