Repository navigation
Conversation
- build release phars and docker images without a restored composer cache - set explicit token permissions in bcc and pr-labels - run the PHP lint pipeline with pipefail and quoted pathspecs - add concurrency groups to build-phar and pr-labels - quote $GITHUB_OUTPUT - add a 7-day Dependabot cooldown
| composer update --no-install | ||
|
|
||
| - name: Cache composer cache | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5 |
There was a problem hiding this comment.
Removed on purpose (cache-poisoning). This job publishes the phar on releases, and it restored the Linux-composer-* cache that other workflows on the default branch also write. Composer does not verify dist checksums for most GitHub-hosted packages, so a poisoned entry there would end up inside the released phar. Without the cache, composer install downloads everything fresh, which makes the build a little slower.
| composer update --no-install | ||
|
|
||
| - name: Cache composer cache | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5 |
There was a problem hiding this comment.
Same reason as in build-phar.yml: this job pushes the image on tags, so it should not build from a restored cache.
| - run: | | ||
| git ls-files | grep \\\.php$ | grep -v ^dictionaries/scripts/* | ./vendor/bin/parallel-lint --stdin | ||
| - shell: bash | ||
| run: git ls-files -- '*.php' ':(exclude)dictionaries/scripts/' | ./vendor/bin/parallel-lint --stdin |
There was a problem hiding this comment.
Same file list as the old grep chain (I diffed both: 1737 files). The old version had two problems. Without pipefail, a failing git ls-files went unnoticed and the step linted nothing. And the regexes were not quoted, so the shell could treat ^dictionaries/scripts/* as a glob. shell: bash makes Actions run with -o pipefail.
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
Before this, the job ran with the repository's default token permissions. It only checks out the code and runs roave/backward-compatibility-check, so contents: read is enough.
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
| permissions: | ||
| pull-requests: read |
There was a problem hiding this comment.
mheap/github-action-required-labels at this pin calls only issues.listLabelsOnIssue. It calls listComments/deleteComment only with add_comment: true, which this workflow does not set, so read access is enough. The concurrency group drops stale runs when labels change several times in a row.
| schedule: | ||
| interval: "weekly" | ||
| cooldown: | ||
| default-days: 7 |
There was a problem hiding this comment.
With this, Dependabot waits 7 days after an action release before proposing it (its implicit default is 3 days). A compromised release is then more likely to be found and pulled before we pin it.
| missing-timeout: off | ||
| # Unfiltered "push" is deliberate: it runs CI on contributors' fork branches before a PR exists. | ||
| duplicate-triggers: off | ||
| superfluous-actions: off |
There was a problem hiding this comment.
superfluous-actions only flagged svenstaro/upload-release-action in build-phar.yml and suggested replacing it with gh release upload. That is a style preference, not a bug, so the rule is off. missing-timeout would mean picking an upper bound for every analysis and test job (21 jobs), and a wrong guess would kill slow but healthy runs.
| jobs: | ||
| jactionlint: | ||
| name: jactionlint | ||
| runs-on: ubuntu-24.04 |
There was a problem hiding this comment.
The runner is pinned to ubuntu-24.04 instead of ubuntu-latest because jactionlint checks run: scripts only when shellcheck is on PATH. The 24.04 image has it, and pinning keeps that from changing silently.
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: jdx/jactionlint@9e87e8f34edfc00b849a27807e26eff9d00b936d # v2.5.0 |
There was a problem hiding this comment.
The action pins the jactionlint version too: its version input defaults to the release the action was published with. Dependabot (with the new cooldown) will propose updates.
✅ Performance: unchanged · Issues: unchanged
How to read this table
head 81c0f02 · base 0cc606c (merge-base) · workflow run |
A native concurrency group leaves the next run pending, which skip-duplicate-actions (concurrent_skipping: always) treats as a concurrent duplicate, so both runs could skip building the phar.
Adds a jactionlint job that runs on changes under
.github/and fixes what it found on the current workflows.The release builds (
build-phar,build-docker) restored the shared composer cache, so a poisoned cache entry could end up in a published phar or image; they now install without it.bccandpr-labelsran with the repository's default token permissions and now request only what they use. The PHP lint step inci.ymlpipedgit ls-filesthrough unquotedgreppatterns withoutpipefail, so a failinggitwent unnoticed; it now uses a pathspec (same 1737 files) undershell: bash. Smaller items: a concurrency group forpr-labels, quoted$GITHUB_OUTPUT, and a 7-day Dependabot cooldown..github/jactionlint.yamlkeeps the default profile but turns offmissing-timeout,duplicate-triggers(unfilteredpushruns CI on fork branches on purpose) andsuperfluous-actions, and records whybuild-phar.ymlkeeps its concurrency in skip-duplicate-actions and whyperf-comment.yml'sworkflow_runtrigger andpull-requests: writeare acceptable.