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
20 changes: 20 additions & 0 deletions .github/actions/require-role/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# A run started by hand goes on only when whoever started (or re-ran) it has one of the given
# repository roles. Scheduled runs pass: nobody started them.
name: Require role
description: Fails a run started by hand unless whoever started it has one of the given roles
inputs:
roles:
description: Repository roles that may start the run, space-separated
default: admin
runs:
using: composite
steps:
- if: github.event_name == 'workflow_dispatch'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
ACTOR: ${{ github.triggering_actor }}
ROLES: ${{ inputs.roles }}
run: |
role="$(gh api "repos/$GITHUB_REPOSITORY/collaborators/$ACTOR/permission" --jq .role_name)"
[[ " $ROLES " == *" $role "* ]] || { echo "::error::only $ROLES can run this, not $ACTOR ($role)"; exit 1; }
1 change: 1 addition & 0 deletions .github/workflows/build-frankenphp-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
ok: ${{ steps.done.outputs.ok }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role
- id: config
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-pg-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
asset: ${{ steps.config.outputs.asset }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role

- id: config
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-php-exts-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role
- id: config
run: |
echo "asset=php-exts-$MINOR-build$(jq -r .php.windows.extensions.build versions.json)-windows-x64.zip" >> "$GITHUB_OUTPUT"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-php-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role

- name: Read versions.json
id: config
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-php-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role

- name: Read versions.json
id: config
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role

- id: config
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role
- id: config
run: |
# PHP for Windows is configured next to PHP for macOS, not under packages.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Records a channel decision in channels.json, commits it to main as whoever ran the workflow, and
# rebuilds the manifests from that commit right away (manifest.yml), so it takes effect within
# minutes. Run it from the Actions tab; the "Ready for testing" issue lists what is waiting.
# Only admins and maintainers can run it.
# promote-beta approve for beta (then stable after the patch waiting time)
# promote-stable approve for stable (never for pre-releases)
# hold / unhold stop or restart every timer of a build (hold needs a reason)
Expand Down Expand Up @@ -47,6 +48,9 @@ jobs:
REASON: ${{ inputs.reason }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role
with:
roles: admin maintain
- uses: actions/setup-go@v7
with:
go-version-file: tools/flockrel/go.mod
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
mirrors: ${{ steps.plan.outputs.mirrors }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/require-role
- uses: actions/setup-go@v7
with:
go-version-file: tools/flockrel/go.mod
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ mirrors and tests each one, and uploads it to a release tagged `<package>-<versi
passed (a smoke test on a fresh runner: on macOS without Homebrew), and an uploaded asset is never
replaced. Run `Release` by hand with `packages` (e.g. `postgres,node`, or `php`, `php-exts`,
`frankenphp`) to publish only some packages, or a build workflow by hand to test a version without
publishing it.
publishing it. Only admins can run these by hand.

To rebuild versions that are already published (a security fix in a bundled library, an added
extension, a bug the tests missed), raise the platform's `build` in `versions.json`. The next run
Expand Down Expand Up @@ -252,7 +252,8 @@ its way to stable and when, and what is held, yanked or a pre-release. The Manif
it up to date, comments when a build newly waits for a decision, and closes it when nothing is
pending.

Decisions are made with the **Promote** workflow (Actions → Promote → Run workflow):
Decisions are made with the **Promote** workflow (Actions → Promote → Run workflow), by admins and
maintainers:

| Action | Does |
|---|---|
Expand Down