Repository navigation
559 lines (519 loc) · 25.3 KB
/
Copy pathplugin-check.yml
File metadata and controls
559 lines (519 loc) · 25.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
name: Plugin Check
# Runs WordPress.org's Plugin Check against the built plugin: the same files the release zip ships,
# so tests, dotfiles, node_modules and other dev-only files cannot cause false positives.
#
# A reusable workflow. A plugin repository calls it from a thin workflow of its own; copy
# templates/workflows/plugin-check.yml.
#
# The plugin is built with pup by default (`pup build`, then `pup package`), so the repository's
# .puprc and ignore files decide what is checked, the same as the release. pup comes from the shared
# zip-name and release-zip actions, so the repository does not need a copy of it or a Composer
# script for it. A repository without pup passes `build-command` instead; see the plugin-check-report README.
#
# Four jobs, so the third-party action never holds a token that can write. The comments are written
# by .github/actions/pr-comment, which calls the GitHub API itself:
# start posts "in progress" on the pull request.
# plan lists the excluded checks, and decides whether the target branch is checked too.
# check builds the plugin and runs wordpress/plugin-check-action. Read-only token. It runs for
# the pull request ("head") and, when the repository has no baseline file, for the commit
# the pull request targets ("base"), in parallel.
# report compares the results with the baseline and replaces the comment with the result.
#
# The baseline is the repository's `.plugin-check-baseline.json`, read from the pull request's own
# checkout. Without that file, a pull request is compared with the target branch's results instead,
# which costs a second build and check; commit the file to stop that.
#
# The action also tries to post its own comment. With a read-only token that call fails (it logs
# "Failed to post PR comment" and carries on), so the only comment is ours.
#
# The caller has to grant every permission a job below asks for: a called workflow can lower the
# token's permissions, never raise them, and GitHub refuses to start the run when a job asks for
# more than the caller gave. `concurrency` is the caller's too: here it would be evaluated with the
# caller's context and could clash with the caller's own group.
#
# Run it locally: see "Running it locally" in .github/actions/plugin-check-report/README.md. In
# short, `wp plugin check <slug> --format=json > results.txt` in a local WordPress, then
# `node .github/actions/plugin-check-report/plugin-check-report.js compare results.txt`.
on:
workflow_call:
inputs:
plugin-slug:
description: >-
The plugin's folder name, e.g. `my-plugin`. It has to equal the top folder of the zip pup
builds (`zip_name` in .puprc), because Plugin Check takes the slug from the folder name.
required: true
type: string
main-file:
description: 'The main plugin file inside the plugin folder. Empty means `<plugin-slug>.php`.'
required: false
type: string
default: ''
build-command:
description: >-
Empty (the default) builds with pup. Otherwise a bash command that runs in the root of
the checkout instead of pup, and leaves the plugin as it ships in
"$PLUGIN_CHECK_BUILD_DIR/<plugin-slug>/". Prefer .puprc when the repository has one: this
is a second place that defines the build.
required: false
type: string
default: ''
pup-version:
description: >-
The pup release that builds the plugin, e.g. `2.0.0`, or `latest`. Use the release the
repository's own release build uses, so the check sees the same files. Not used with
`build-command`.
required: false
type: string
default: '2.0.0'
runs-on:
description: >-
Runner label for the job that builds and checks, of runner version 2.336.0 or newer: the
job uses the `$/` reference. The two small jobs run on ubuntu-latest.
required: false
type: string
default: 'ubuntu-latest'
php-version:
description: >-
PHP that builds vendor/. Use the oldest version the plugin supports, as its release does,
so Composer resolves dependencies that still run there.
required: false
type: string
default: '7.4'
exclude-checks:
description: >-
Checks to skip, one per line. When it names any, it replaces the `exclude-checks` list in
the repository's `.plugin-check.json`; when empty, that file is used. See the
plugin-check-report README.
required: false
type: string
default: ''
cache-paths:
description: >-
Build caches to keep between runs, one path per line, relative to the repository root,
e.g. `.cache/webpack`. Empty keeps none. A path inside node_modules does not survive:
pup's build reinstalls it.
required: false
type: string
default: ''
mode:
description: >-
`baseline`: fail only when a rule has more errors than the baseline. `strict`: fail on any
error. Not the `strict` input of wordpress/plugin-check-action, which means something else.
required: false
type: string
default: 'baseline'
submodules:
description: 'Passed to actions/checkout: `false`, `true` or `recursive`.'
required: false
type: string
default: 'false'
secrets:
composer-token:
description: >-
GitHub token for private Composer packages. Becomes COMPOSER_AUTH for the build step
only.
required: false
package-token:
description: >-
Token for private npm or bun packages. Becomes NODE_AUTH_TOKEN, BUN_AUTH_TOKEN and
GITHUB_TOKEN for the build step only.
required: false
env:
# Hidden line that marks the pull request comment. The report action writes it as the
# first line of the body, and the pr-comment action searches for it. Named after the repository, so
# two plugin repositories never share a marker.
COMMENT_MARKER: '<!-- plugin-check:${{ github.repository }} -->'
# Only pull requests from this repository get a comment: a fork's token is read-only.
COMMENT: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
jobs:
start:
name: Plugin Check start
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
issues: write
pull-requests: write
steps:
# One comment per pull request, found by a hidden marker line and replaced on every run. The
# badge time is Eastern Time: %Z prints EST in winter and EDT in summer.
- name: Make the start badge
id: badge
run: |
stamp=$(LC_ALL=C TZ='America/New_York' date '+%m/%d %I:%M %p %Z')
stamp=${stamp// /%20}
stamp=${stamp//\//%2F}
echo "url=https://img.shields.io/badge/Check%20Started-${stamp}-blue" >> "$GITHUB_OUTPUT"
# A failed API call here must not stop the check.
- name: Post "in progress"
continue-on-error: true
uses: $/.github/actions/pr-comment
with:
marker: ${{ env.COMMENT_MARKER }}
body: |
${{ env.COMMENT_MARKER }}
⏳ Plugin Check in progress

# Works out, from the repository's files, what the check job needs to know. Cheap: a sparse
# checkout of two files. A bad .plugin-check.json fails here in seconds, before any build.
plan:
name: Plugin Check plan
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
outputs:
matrix: ${{ steps.target.outputs.matrix }}
base: ${{ steps.target.outputs.base }}
checks: ${{ steps.exclude.outputs.checks }}
steps:
- uses: actions/checkout@v7
with:
path: source
sparse-checkout: |
.plugin-check.json
.plugin-check-baseline.json
sparse-checkout-cone-mode: false
persist-credentials: false
# The checks to skip: the `exclude-checks` input when it names any, else the list in the
# repository's .plugin-check.json. Like the report job, this needs a runner of version 2.336.0
# or newer for `$/`; the two small jobs run on ubuntu-latest, which has it.
- name: List the excluded checks
id: exclude
uses: $/.github/actions/plugin-check-report/exclude-checks
with:
exclude-checks: ${{ inputs.exclude-checks }}
config-file: ${{ github.workspace }}/source/.plugin-check.json
# A pull request in baseline mode, in a repository with no baseline file, is compared with the
# target branch, so that commit is built and checked too. Strict mode needs no baseline, and a
# push has no target to compare with.
- name: Decide whether to check the target branch
id: target
env:
EVENT: ${{ github.event_name }}
MODE: ${{ inputs.mode }}
run: |
if [ "$EVENT" = pull_request ] && [ "$MODE" != strict ] && [ ! -f source/.plugin-check-baseline.json ]; then
echo 'matrix={"target":["head","base"]}' >> "$GITHUB_OUTPUT"
echo 'base=true' >> "$GITHUB_OUTPUT"
echo "::notice title=Plugin Check::There is no .plugin-check-baseline.json, so the target branch is built and checked too. Commit the baseline.json from the plugin-check-report artifact of this run to stop that."
else
echo 'matrix={"target":["head"]}' >> "$GITHUB_OUTPUT"
echo 'base=false' >> "$GITHUB_OUTPUT"
fi
check:
name: Plugin Check run (${{ matrix.target }})
needs: plan
runs-on: ${{ inputs.runs-on }}
strategy:
# The pull request and its target branch are separate checks: one failing must not stop the other.
fail-fast: false
matrix: ${{ fromJSON(needs.plan.outputs.matrix) }}
# Build, WordPress start and the check together take about 15 minutes for a large plugin. The cap is
# for a container that stops answering.
timeout-minutes: 30
# Read-only on purpose: this job runs a third-party action. Its own attempt to post a comment
# fails with this token, which is what keeps the pull request to one comment.
permissions:
contents: read
env:
PLUGIN_CHECK_BUILD_DIR: ${{ github.workspace }}/build
SLUG: ${{ inputs.plugin-slug }}
MAIN_FILE: ${{ inputs.main-file || format('{0}.php', inputs.plugin-slug) }}
steps:
# The repo goes into source/, so the workspace root has no .wp-env.json. A repo's own file
# mounts the repo root as a plugin, and the action would merge into it.
- uses: actions/checkout@v7
with:
path: source
# "base" is the commit the pull request targets, as it is without the pull request.
ref: ${{ matrix.target == 'base' && github.event.pull_request.base.sha || '' }}
submodules: ${{ inputs.submodules }}
# Nothing here pushes over git, and the job goes on to run third-party code.
persist-credentials: false
# The action's wp-env pulls these images when it starts, and pulling them is part of the
# time that step takes. Started now, in the background, the download overlaps with the
# build. The images are the ones wp-env's generated files name (FROM wordpress..., FROM
# wordpress:cli..., image: mariadb:lts); if a later wp-env names others, these pulls are just
# wasted, never wrong. A failed pull only means wp-env pulls the image itself, so this step
# cannot fail the job.
- name: Start pulling the wp-env Docker images
continue-on-error: true
env:
IMAGES: wordpress wordpress:cli mariadb:lts
run: |
(
set +e
start=$(date +%s)
for image in $IMAGES; do
docker pull --quiet "$image" || echo "Could not pull $image, wp-env will pull it." &
done
wait
echo "Pulled in $(( $(date +%s) - start )) seconds."
touch "$RUNNER_TEMP/docker-pull.done"
) > "$RUNNER_TEMP/docker-pull.log" 2>&1 < /dev/null &
- name: Set Up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
coverage: none
- name: Find the Composer cache
id: composer-cache
working-directory: source
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache dependencies
uses: actions/cache@v6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ hashFiles('source/composer.lock') }}
# The JavaScript toolchain is picked from the files the repository already has, not from an
# input: .nvmrc for Node, package-lock.json for the npm cache, bun.lock or bun.lockb for bun.
- name: Set Up Node
if: ${{ hashFiles('source/.nvmrc') != '' }}
uses: actions/setup-node@v7
with:
node-version-file: source/.nvmrc
cache: ${{ hashFiles('source/package-lock.json') != '' && 'npm' || '' }}
cache-dependency-path: source/package-lock.json
- name: Set Up Bun
if: ${{ hashFiles('source/bun.lock', 'source/bun.lockb') != '' }}
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
# actions/cache takes paths relative to the workspace, and the repository sits in source/.
# A path that leaves the checkout is refused: it would cache files this job did not build.
- name: List the cache paths
id: cache-paths
if: ${{ inputs.cache-paths != '' }}
env:
CACHE_PATHS: ${{ inputs.cache-paths }}
run: |
{
echo 'paths<<PLUGIN_CHECK_PATHS'
while IFS= read -r line; do
line=$(echo "$line" | xargs)
[ -n "$line" ] || continue
case "$line" in
/* | ..* | */..*) echo "::error title=Plugin Check::cache-paths must stay inside the repository: $line"; exit 1 ;;
esac
echo "source/$line"
done <<< "$CACHE_PATHS"
echo 'PLUGIN_CHECK_PATHS'
} >> "$GITHUB_OUTPUT"
# Each commit saves a new entry; the restore key picks the newest one for the same lockfile.
# A stale cache must be safe for the tool that owns it (webpack checks every entry against
# the files).
- name: Restore the build cache
id: build-cache
if: ${{ inputs.cache-paths != '' }}
uses: actions/cache/restore@v6
with:
path: ${{ steps.cache-paths.outputs.paths }}
key: plugin-check-${{ runner.os }}-${{ hashFiles('source/package-lock.json', 'source/bun.lock', 'source/bun.lockb') }}-${{ github.sha }}
restore-keys: |
plugin-check-${{ runner.os }}-${{ hashFiles('source/package-lock.json', 'source/bun.lock', 'source/bun.lockb') }}-
# pup builds and packages the plugin, so .puprc and the ignore files decide what is checked,
# the same as the release. The version and the zip name come from the zip-name action, the zip
# from release-zip: the same QA build the zip workflow makes, without `pup check` and `pup i18n`,
# which this workflow does not need. pup runs on the PHP set up above. The repository is in
# source/, so both actions run there.
- name: Name the zip
id: zip-name
if: ${{ inputs.build-command == '' }}
uses: $/.github/actions/zip-name
with:
production: 'no'
prerelease: dev
pup-version: ${{ inputs.pup-version }}
working-directory: source
# The secrets reach this step only, never the job, so the third-party action later in this
# job does not see them in its environment. The build runs with them in its environment, as
# pup build needs them to install private packages.
- name: Build the plugin with pup
id: zip
if: ${{ inputs.build-command == '' }}
uses: $/.github/actions/release-zip
with:
version: ${{ steps.zip-name.outputs.version }}
production: 'no'
check: 'no'
i18n: 'no'
pup-version: ${{ inputs.pup-version }}
working-directory: source
env:
COMPOSER_AUTH: >-
${{ secrets.composer-token != '' && format('{{"github-oauth": {{"github.com": "{0}"}}}}', secrets.composer-token) || '' }}
NODE_AUTH_TOKEN: ${{ secrets.package-token }}
BUN_AUTH_TOKEN: ${{ secrets.package-token }}
GITHUB_TOKEN: ${{ secrets.package-token != '' && secrets.package-token || github.token }}
- name: Build the plugin with build-command
if: ${{ inputs.build-command != '' }}
working-directory: source
env:
BUILD_COMMAND: ${{ inputs.build-command }}
PACKAGE_TOKEN: ${{ secrets.package-token }}
COMPOSER_TOKEN: ${{ secrets.composer-token }}
run: |
if [ -n "$COMPOSER_TOKEN" ]; then
COMPOSER_AUTH=$(jq -cn --arg token "$COMPOSER_TOKEN" '{"github-oauth": {"github.com": $token}}')
export COMPOSER_AUTH
fi
if [ -n "$PACKAGE_TOKEN" ]; then
export NODE_AUTH_TOKEN="$PACKAGE_TOKEN" BUN_AUTH_TOKEN="$PACKAGE_TOKEN" GITHUB_TOKEN="$PACKAGE_TOKEN"
fi
unset COMPOSER_TOKEN PACKAGE_TOKEN
mkdir -p "$PLUGIN_CHECK_BUILD_DIR"
echo "Building with build-command."
bash -eo pipefail -c "$BUILD_COMMAND"
- name: Unpack the zip
if: ${{ inputs.build-command == '' }}
env:
ZIP_PATH: ${{ steps.zip.outputs.zip-path }}
run: |
mkdir -p "$PLUGIN_CHECK_BUILD_DIR"
unzip -q "$ZIP_PATH" -d "$PLUGIN_CHECK_BUILD_DIR"
# The one contract every build has to meet, pup or not: a folder named after the slug, with
# the main plugin file in it. Plugin Check takes the slug from the folder name, so a wrong
# folder would check nothing useful and still look green.
- name: Check the built plugin
env:
CACHE_PATHS: ${{ inputs.cache-paths }}
run: |
dir="$PLUGIN_CHECK_BUILD_DIR/$SLUG"
if [ ! -f "$dir/$MAIN_FILE" ]; then
echo "::error title=Plugin Check::The build did not leave $SLUG/$MAIN_FILE in $PLUGIN_CHECK_BUILD_DIR. Found: $(find "$PLUGIN_CHECK_BUILD_DIR" -mindepth 1 -maxdepth 1 -printf '%f ')"
exit 1
fi
# A cache that ends up in the plugin would be checked, and shipped by the release.
while IFS= read -r line; do
line=$(echo "$line" | xargs)
[ -n "$line" ] || continue
if [ -e "$dir/$line" ]; then
echo "::error title=Plugin Check::The cache path $line is inside the built plugin. Add it to .distignore or to .gitattributes with export-ignore."
exit 1
fi
done <<< "$CACHE_PATHS"
echo "Checking $dir ($(find "$dir" -type f | wc -l | xargs) files)."
# Saved now, before the third-party action below runs, so nothing it does can end up in a
# cache that later runs restore. Skipped when this exact commit already saved one, and for the
# target branch, which only reads the cache.
- name: Save the build cache
if: ${{ matrix.target == 'head' && inputs.cache-paths != '' && steps.build-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v6
with:
path: ${{ steps.cache-paths.outputs.paths }}
key: ${{ steps.build-cache.outputs.cache-primary-key }}
# Waits for the pulls started earlier, so wp-env does not start a second download of an
# image that is still coming, and prints how long they took. Gives up after two minutes and
# lets wp-env carry on; never fails the job.
- name: Wait for the Docker image pulls
continue-on-error: true
timeout-minutes: 3
run: |
for _ in $(seq 120); do
[ -f "$RUNNER_TEMP/docker-pull.done" ] && break
sleep 1
done
cat "$RUNNER_TEMP/docker-pull.log" 2>/dev/null || true
# Fails on any error, which is expected while a plugin still has known problems: the report
# job decides pass or fail from the counts. The action writes its results to
# $RUNNER_TEMP/plugin-check-results.txt and uploads them as the plugin-check-results
# artifact. Its `slug` input is passed for the target branch only: it renames that artifact to
# plugin-check-results-<slug>, so the two do not clash.
- name: Run Plugin Check
continue-on-error: true
uses: wordpress/plugin-check-action@v1
with:
build-dir: ${{ github.workspace }}/build/${{ inputs.plugin-slug }}
exclude-checks: ${{ needs.plan.outputs.checks }}
# The target branch's results go into an artifact of their own. The slug is the folder the
# plugin is in anyway, so the checks see the same thing; only the artifact's name changes.
slug: ${{ matrix.target == 'base' && inputs.plugin-slug || '' }}
report:
name: Plugin Check
needs: [start, plan, check]
# "start" is skipped for forks and non-pull-request runs, which would skip this job too.
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
timeout-minutes: 10
# Writes one comment on the pull request, and reads the repository's baseline file. The
# scripts come with the action.
permissions:
contents: read
issues: write
pull-requests: write
steps:
# Only the baseline file, nothing else of the repository. It is JSON that the compare reads
# and never runs. The checkout is the pull request's merge commit, so a pull request that
# changes the file is compared with its own change, which a reviewer sees in the diff.
- name: Check out the baseline file
uses: actions/checkout@v7
with:
path: source
sparse-checkout: .plugin-check-baseline.json
sparse-checkout-cone-mode: false
# The merge commit and its two parents, to see whether the pull request changes the file.
fetch-depth: 2
persist-credentials: false
# The comment says so when a pull request changes the baseline: it is compared with its own
# change, which a reviewer should look at.
- name: Check whether the pull request changes the baseline file
id: changed
if: ${{ github.event_name == 'pull_request' }}
working-directory: source
run: |
if git diff --quiet HEAD^1 HEAD -- .plugin-check-baseline.json; then
echo 'changed=false' >> "$GITHUB_OUTPUT"
else
echo 'changed=true' >> "$GITHUB_OUTPUT"
fi
- name: Set file paths
run: |
{
echo "RESULTS=$RUNNER_TEMP/results/plugin-check-results.txt"
echo "BASE_RESULTS=$RUNNER_TEMP/base-results/plugin-check-results.txt"
echo "COMMENT_BODY=$RUNNER_TEMP/plugin-check-comment.md"
} >> "$GITHUB_ENV"
# The action uploaded its results under this name. Missing when the build or the check broke
# before then: the compare reports that.
- name: Download the results
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: plugin-check-results
path: ${{ runner.temp }}/results
# The target branch's results, when the plan said to check it. A missing artifact is not an
# error here: the compare fails with a message that says the target could not be checked.
- name: Download the target branch's results
if: ${{ needs.plan.outputs.base == 'true' }}
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: plugin-check-results-${{ inputs.plugin-slug }}
path: ${{ runner.temp }}/base-results
# `$/` is this repository at the commit that runs this workflow, so the action is always the
# same revision as the workflow, whichever ref the caller used, and it needs no checkout. It
# needs a runner of version 2.336.0 or newer; this job runs on ubuntu-latest. Not ./, which
# in a called workflow resolves against the caller's repository.
#
# The action also writes the "Check Finished" badge into the body, and, when the build or the
# check broke and there was nothing to compare, a body that says Plugin Check could not run,
# so "in progress" never stays on the pull request.
- name: Compare with the baseline
uses: $/.github/actions/plugin-check-report
with:
results: ${{ env.RESULTS }}
comment-file: ${{ env.COMMENT_BODY }}
comment-marker: ${{ env.COMMENT_MARKER }}
mode: ${{ inputs.mode }}
baseline-file: ${{ github.workspace }}/source/.plugin-check-baseline.json
base-results: ${{ needs.plan.outputs.base == 'true' && env.BASE_RESULTS || '' }}
base-required: ${{ needs.plan.outputs.base == 'true' }}
baseline-changed: ${{ steps.changed.outputs.changed == 'true' }}
- name: Post the result
if: ${{ !cancelled() && env.COMMENT == 'true' }}
continue-on-error: true
uses: $/.github/actions/pr-comment
with:
marker: ${{ env.COMMENT_MARKER }}
body-file: ${{ env.COMMENT_BODY }}