Skip to content

A collection of reusable GitHub workflows that are used by the Platform.sh collection of templates

Notifications You must be signed in to change notification settings

platformsh-templates/ghrw-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 

Repository files navigation

Platform.sh Reusable GitHub Workflows for Templates

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.

Description

Creates an auto merging PR when a target branch is updated.

Inputs

  • CW_JOBID - Optional. The name of the job id in the calling workflow that calls the testprenvironments.yaml reusable workflow. Defaults to TestPrEnv-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>.

Uses

Example:

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

Description

Runs all other workflows and actions that should occur after a PR has been accepted.

Uses

Example:

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

Description

Updates the ./.platform/last.updated file with the current date

Uses

  • actions/checkout

Example:

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

Description

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.

Uses

  • actions/checkout@v3
  • tj-actions/changed-files
  • actions/checkout@v2

Example:

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

Description

Runs the Source Operations Toolkit

Inputs

  • 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.

Uses

Example:

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

Description

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.

Inputs

  • 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

Uses

Example:

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

About

A collection of reusable GitHub workflows that are used by the Platform.sh collection of templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published