Skip to content

GH Actions: add yaml/GHA workflow QA checks - #73

Merged
jrfnl merged 2 commits into
masterfrom
feature/ghactions-add-yaml-checks
Oct 22, 2026
Merged

jrfnl merged 2 commits into
masterfrom
feature/ghactions-add-yaml-checks

Conversation

@jrfnl

@jrfnl jrfnl commented Oct 21, 2026

Copy link
Copy Markdown
Member

GH Actions: add new "pinact" job

In a previous PR, all action runners used in GH Actions workflows where "pinned" to precise versions for security reasons.
However, that doesn't prevent new jobs, or changes to existing jobs, from being introduced which do not correctly pin action runners.

This commit introduces a new GHA job which runs the pinact tooling via a reusable workflow as available since the PHPCSStandards/.github 1.3.0 release.

Pinact is a tool which can be used to:

  • Update the action runner references in existing workflows to commit-hash "pinned" versions.
  • Verify that the commit hash to which an action runner is pinned is valid.
  • Verify that a "pinned" commit-hash matches the version number in the comment following the action runner reference.
  • Verify that a mandatory "minimum age" (cooldown) period is respected. The default min-age setting is 7 days.
  • Safeguard that any changes in workflows do not introduce new unpinned action runner references.

The pinact action runner can also push a new commit to open PRs if the "verification"checks fail, however I do not think this is necessary at this time.
The inline annotations in a PR and the failing build should be sufficient to prevent new issues from entering the workflows.

Notes:

  • I've added a .pinact.yaml file. This is required for the reusable workflow to run, but also ensures that running the tool locally vs running it in CI will yield the same results.
  • In the configuration, I've set the "min-age" for dependencies to 3 days (default = 7) to be in line with the GitHub default cooldown setting.
    At a later point in time we may want to increase this number. This should be done in conjunction with the cooldown setting in the dependabot.yml configuration.

Includes ignoring the new config file for dist packages via .gitattributes.

Refs:

GH Actions: add Yamllint to validate workflow

... to loosely safeguard valid and consistent yaml files.

Includes adding a configuration file which loosens up the default ruleset to a degree I'm comfortable with.

Ref: https://yamllint.readthedocs.io/

jrfnl added 2 commits October 21, 2026 01:42
In a previous PR, all action runners used in GH Actions workflows where "pinned" to precise versions for security reasons.
However, that doesn't prevent new jobs, or changes to existing jobs, from being introduced which do not correctly pin action runners.

This commit introduces a new GHA job which runs the `pinact` tooling via a reusable workflow as available since the `PHPCSStandards/.github` 1.3.0 release.

Pinact is a tool which can be used to:
* Update the action runner references in existing workflows to commit-hash "pinned" versions.
* Verify that the commit hash to which an action runner is pinned is valid.
* Verify that a "pinned" commit-hash matches the version number in the comment following the action runner reference.
* Verify that a mandatory "minimum age" (`cooldown`) period is respected. The default `min-age` setting is 7 days.
* Safeguard that any changes in workflows do not introduce new unpinned action runner references.

The pinact action runner can also push a new commit to open PRs if the "verification"checks fail, however I do not think this is necessary at this time.
The inline annotations in a PR and the failing build should be sufficient to prevent new issues from entering the workflows.

Notes:
* I've added a `.pinact.yaml` file. This is required for the reusable workflow to run, but also ensures that running the tool locally vs running it in CI will yield the same results.
* In the configuration, I've set the "min-age" for dependencies to 3 days (default = 7) to be in line with the GitHub default `cooldown` setting.
    At a later point in time we may want to increase this number. This should be done in conjunction with the `cooldown` setting in the `dependabot.yml` configuration.

Includes ignoring the new config file for dist packages via `.gitattributes`.

Refs:
* https://github.com/PHPCSStandards/.github/releases/tag/v1.3.0
* https://github.com/suzuki-shunsuke/pinact
* https://github.com/suzuki-shunsuke/pinact#configuration
* https://github.com/suzuki-shunsuke/pinact-action
... to loosely safeguard valid and consistent yaml files.

Includes adding a configuration file which loosens up the `default` ruleset to a degree I'm comfortable with.

Ref: https://yamllint.readthedocs.io/
@jrfnl jrfnl added this to the 2.0.0-alpha2 milestone Oct 21, 2026
@jrfnl
jrfnl merged commit efe0bca into master Oct 22, 2026
8 checks passed
@jrfnl
jrfnl deleted the feature/ghactions-add-yaml-checks branch October 22, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant