A collection of reusable GitHub workflows that are used by the Platform.sh collection of templates. Inputs are received via Repository Variables. See workflow description for possible inputs.
Creates an auto merging PR when a target branch is updated.
CW_JOBID
- Optional. The name of the job id in the calling workflow that calls the testprenvironments.yaml reusable workflow. Defaults toTestPrEnv-CW
STATUS_CHECKS
- Optional. Comma seperated list of status checks that must pass for the PR to be accepted. Defaults to
TestPrEnv-CW / TestPrEnvironment
. Please note that if the required status check is contained in a reusable workflow, the naming convention is<calling-workflow-job-id> / <reusable-workflow-job-id>
.
name: Trigger Auto PR on push to update branch
on:
push:
branches:
- update
jobs:
run-reusable-autopr:
uses: platformsh-templates/ghrw-templates/.github/workflows/autopr.yaml@main
secrets: inherit
Runs all other workflows and actions that should occur after a PR has been accepted.
name: Runs post merge-acceptance workflows
on:
push:
branches:
- main
- master
jobs:
run-reusable-post-pr-acceptance:
uses: platformsh-templates/ghrw-templates/.github/workflows/post-pr-acceptance.yaml@main
secrets: inherit
Updates the ./.platform/last.updated file with the current date
- actions/checkout
name: Update last.updated
on:
push:
branches:
- main
- master
jobs:
run-reusable-last-update:
uses: platformsh-templates/ghrw-templates/.github/workflows/last-updated.yaml@main
secrets: inherit
Keeps Platform.sh configuration files in sync between a template's repository and the template-builder system. Upon detection of a change to a Platform.sh configuration file(s), commits those changes to the template-builder repository for the relevant template, and creates a pull request.
- actions/checkout@v3
- tj-actions/changed-files
- actions/checkout@v2
name: Track and sync tracked files
on:
push:
branches:
- main
- master
jobs:
run-reusable-tb-sync:
uses: platformsh-templates/ghrw-templates/.github/workflows/tb-sync.yaml@main
secrets: inherit
Runs the Source Operations Toolkit
- To set the name of the branch the toolkit should target for the update, set a repository variable named
SOP_UPDATE_BRANCH
with the name of the branch.
name: Trigger Source Operations on a Schedule
on:
schedule:
# Run at 00:15 after every 19th hour
- cron: '15 */19 * * *'
workflow_dispatch:
jobs:
run-reusable-sop-update:
uses: platformsh-templates/ghrw-templates/.github/workflows/sourceops.yaml@main
secrets: inherit
Runs a series of tests against the Pull Request environment to ensure no regressions have been introduced. See the platformsh/gha-template-pr-tests action for more details.
DELAY_START
- Optional. Delay the start of testing for X seconds after the PR environment is available. Please note this is in seconds, not milliseconds. Must be a valid integer.PR_ENV_TIMEOUT
- Optional. The number of seconds the action should wait for Platform.sh to report back with a PR environment URL. Please note this is in seconds, not milliseconds. Must be a valid integer
- platformsh/gha-retrieve-projectid
- platformsh/gha-retrieve-production-url
- platformsh/gha-template-pr-tests
name: "TestPullRequestEnv"
run-name: "TestPullRequestEnv"
on:
workflow_run:
workflows: [ "platformsh" ]
types:
- completed
pull_request:
branches:
- master
- main
jobs:
TestPrEnv-CW:
uses: platformsh-templates/ghrw-templates/.github/workflows/testprenvironment.yaml@main
secrets: inherit