Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/cd-built-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ name: CD / Built Branch
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
targets:
description: >-
JSON array of build target objects. Each needs "dir" (repo-relative; "." for a flat repo)
Expand Down Expand Up @@ -110,7 +114,7 @@ on:
jobs:
discover:
name: Resolve build targets
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
permissions:
contents: read
outputs:
Expand Down Expand Up @@ -292,7 +296,7 @@ jobs:
build:
name: Build ${{ matrix.name }}
needs: [discover]
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
timeout-minutes: 30
# Read-only on purpose: this job runs third-party dependency code, so it must never hold a
# writable token. Only publish does, and it runs no dependency code.
Expand Down Expand Up @@ -416,7 +420,7 @@ jobs:
publish:
name: Publish to ${{ inputs.target-branch }}
needs: [discover, build]
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
timeout-minutes: 10
permissions:
contents: write
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cd-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CD / GitHub Release
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
tag:
description: "Tag that triggered the release, e.g. v1.2.3."
type: string
Expand Down Expand Up @@ -49,7 +53,7 @@ permissions:
jobs:
release:
name: Publish GitHub Release
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
steps:
# An empty artifact-name would make download-artifact fetch every artifact in the run.
- name: Validate inputs
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cd-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CD / S3 Deploy
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
tag:
description: "Release tag, e.g. v1.2.3. Used as the versioned object key (<prefix><tag>.zip)."
type: string
Expand Down Expand Up @@ -41,7 +45,7 @@ permissions:
jobs:
deploy:
name: Upload to S3
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
steps:
# An empty tag would silently upload to '<prefix>.zip'; an empty artifact-name
# downloads every artifact in the run.
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cd-wp-org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CD / WordPress.org Deploy
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
slug:
description: "Plugin slug on wordpress.org (the directory under plugins.svn.wordpress.org)."
type: string
Expand Down Expand Up @@ -44,7 +48,7 @@ permissions:
jobs:
deploy:
name: Deploy to WordPress.org
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
steps:
# An empty slug would fall back to the deploy action's repo-name default and
# deploy to the wrong plugin; an empty artifact-name downloads every artifact.
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-build-artifact-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Build Artifact Gate
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
gated-paths:
description: "Newline-separated path prefixes whose contents must not be committed in a PR."
type: string
Expand All @@ -18,7 +22,7 @@ permissions:
jobs:
build-artifact-gate:
name: Block committed build artifacts
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Build
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
install-node-deps:
description: "Install Node dependencies before the build."
type: boolean
Expand Down Expand Up @@ -54,7 +58,7 @@ permissions:
jobs:
build:
name: Build
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
defaults:
run:
working-directory: ${{ inputs.working-dir }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-detect-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Detect Changes
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
node-version:
description: "Node.js version used to run the wp-tooling CLI."
type: string
Expand Down Expand Up @@ -68,7 +72,7 @@ permissions:
jobs:
detect:
name: Detect changes
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
outputs:
# css/js/php come from the scope step; total/ignored/gha stay repo-wide on detect.
total-count: ${{ steps.detect.outputs.total-count }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-lint-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Lint CSS
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
node-version:
description: "Node.js version."
type: string
Expand All @@ -26,7 +30,7 @@ permissions:
jobs:
lint-css:
name: Stylelint
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
defaults:
run:
working-directory: ${{ inputs.working-dir }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-lint-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Lint JS
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
node-version:
description: "Node.js version."
type: string
Expand Down Expand Up @@ -30,7 +34,7 @@ permissions:
jobs:
lint-js:
name: ESLint
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
defaults:
run:
working-directory: ${{ inputs.working-dir }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Lint PHP
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
php-version:
description: "PHP version."
type: string
Expand Down Expand Up @@ -46,7 +50,7 @@ permissions:
jobs:
lint-php:
name: Lint PHP
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
defaults:
run:
working-directory: ${{ inputs.working-dir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-self-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
self-check:
name: Lint workflows and verify examples
runs-on: [self-hosted]
runs-on: ubuntu-latest
env:
ACTIONLINT_VERSION: "1.7.12"
ACTIONLINT_SHA256: "8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-test-a11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Test a11y
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
node-version:
description: "Node.js version to install."
type: string
Expand All @@ -26,7 +30,7 @@ permissions:
jobs:
test-a11y:
name: pa11y-ci
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
defaults:
run:
working-directory: ${{ inputs.working-dir }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-test-build-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Test Build Artifact
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
artifact-name:
description: "Artifact to download. Must match the artifact-name uploaded by ci-build.yml in the same run."
type: string
Expand Down Expand Up @@ -48,7 +52,7 @@ permissions:
jobs:
test-build-artifact:
name: Boot artifact in wp-env
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
timeout-minutes: 10
defaults:
run:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-test-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Test JS
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
node-version:
description: "Node.js version."
type: string
Expand All @@ -29,7 +33,7 @@ permissions:
jobs:
test-js:
name: Jest
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
defaults:
run:
working-directory: ${{ inputs.working-dir }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CI / Test PHP
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
php-version:
description: "PHP version. Installed on the host (used directly in standalone mode) and passed to wp-env as WP_ENV_PHP_VERSION so the container runs the same version."
type: string
Expand Down Expand Up @@ -40,7 +44,7 @@ permissions:
jobs:
test-php:
name: PHPUnit
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
# Pin the wp-env container's PHP/WordPress core via env: (not $GITHUB_ENV, which is
# newline-injectable) at job scope, so start/run/stop resolve the same environment.
# An empty WP_ENV_CORE is ignored by wp-env (falls back to the consumer's .wp-env.json).
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/version-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Version Monitor
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
node-version:
description: "Node.js version used to install and run wp-tooling"
type: string
Expand Down Expand Up @@ -35,7 +39,7 @@ concurrency:
jobs:
version-monitor:
name: Check for version bumps
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
timeout-minutes: 20
permissions:
contents: write
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/wp-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: CD / Orchestrator
on:
workflow_call:
inputs:
runs-on:
description: "Runner for every job, as JSON: a label such as \"ubuntu-latest\" or a label list such as [\"self-hosted\"]. rtCamp private repos pass [\"self-hosted\"]."
type: string
default: '"ubuntu-latest"'
tag:
description: "Release tag that triggered the deploy, e.g. v1.2.3. Forwarded to every target."
type: string
Expand Down Expand Up @@ -93,7 +97,7 @@ jobs:
# deploy nothing, and a missing input/secret would fail mid-deploy.
validate-inputs:
name: Validate inputs
runs-on: [self-hosted]
runs-on: ${{ fromJSON(inputs.runs-on) }}
steps:
- name: Check deploy targets and their required inputs and secrets
env:
Expand Down Expand Up @@ -158,6 +162,7 @@ jobs:
if: contains(format(',{0},', inputs.deploy-target), ',github,')
uses: ./.github/workflows/cd-github-release.yml
with:
runs-on: ${{ inputs.runs-on }}
tag: ${{ inputs.tag }}
artifact-name: ${{ inputs.artifact-name }}
slug: ${{ inputs.slug }}
Expand All @@ -172,6 +177,7 @@ jobs:
if: contains(format(',{0},', inputs.deploy-target), ',wporg,')
uses: ./.github/workflows/cd-wp-org.yml
with:
runs-on: ${{ inputs.runs-on }}
slug: ${{ inputs.slug }}
tag: ${{ inputs.tag }}
artifact-name: ${{ inputs.artifact-name }}
Expand All @@ -188,6 +194,7 @@ jobs:
if: contains(format(',{0},', inputs.deploy-target), ',s3,')
uses: ./.github/workflows/cd-s3.yml
with:
runs-on: ${{ inputs.runs-on }}
tag: ${{ inputs.tag }}
artifact-name: ${{ inputs.artifact-name }}
bucket: ${{ inputs.bucket }}
Expand Down
Loading