Skip to content

Commit b538b8f

Browse files
committed
Fix workflows
1 parent 978a889 commit b538b8f

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

.github/workflows/backward-compatibility.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
composer global require --dev ondrejmirtes/backward-compatibility-check:^7.3.0.1
5252
5353
- name: "Check"
54-
run: "$(composer global config bin-dir --absolute)/roave-backward-compatibility-check"
54+
run: '"$(composer global config bin-dir --absolute)"/roave-backward-compatibility-check'

.github/workflows/issue-bot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
id: shards
6969
working-directory: "issue-bot"
7070
run: |
71-
echo "shards=$(jq -c '{include: [range(length) | {shard: .}]}' matrix.json)" >> $GITHUB_OUTPUT
71+
echo "shards=$(jq -c '{include: [range(length) | {shard: .}]}' matrix.json)" >> "$GITHUB_OUTPUT"
7272
7373
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7474
with:
@@ -210,7 +210,7 @@ jobs:
210210
./console.php evaluate > tmp/step-summary.md
211211
exit_code="$?"
212212
213-
cat tmp/step-summary.md >> $GITHUB_STEP_SUMMARY
213+
cat tmp/step-summary.md >> "$GITHUB_STEP_SUMMARY"
214214
215215
if [[ "$exit_code" == "2" ]]; then
216216
echo "::notice file=.github/workflows/issue-bot.yml,line=3 ::Issue bot detected open issues which are affected by this pull request - see https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
@@ -235,7 +235,7 @@ jobs:
235235
PHPSTAN_SRC_COMMIT_AFTER: ${{ github.event.after }}
236236
run: |
237237
set +e
238-
./console.php evaluate --post-comments >> $GITHUB_STEP_SUMMARY
238+
./console.php evaluate --post-comments >> "$GITHUB_STEP_SUMMARY"
239239
exit_code="$?"
240240
241241
# its fine when issue-bot found affected issues

.github/workflows/phar.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112

113113
- name: "Save checksum"
114114
id: "checksum"
115-
run: echo "md5=$(md5sum tmp/phpstan.phar | cut -d' ' -f1)" >> $GITHUB_OUTPUT
115+
run: echo "md5=$(md5sum tmp/phpstan.phar | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
116116

117117
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
118118
with:
@@ -231,7 +231,7 @@ jobs:
231231

232232
- name: "Save old checksum"
233233
id: "old_checksum"
234-
run: echo "md5=$(md5sum phpstan.phar | cut -d' ' -f1)" >> $GITHUB_OUTPUT
234+
run: echo "md5=$(md5sum phpstan.phar | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
235235

236236
- name: "Assert checksum"
237237
run: |
@@ -330,7 +330,7 @@ jobs:
330330
- name: "Get previous pushed dist commit"
331331
id: previous-commit
332332
working-directory: phpstan-dist
333-
run: echo "sha=$(sed -n '2p' .phar-checksum)" >> $GITHUB_OUTPUT
333+
run: echo "sha=$(sed -n '2p' .phar-checksum)" >> "$GITHUB_OUTPUT"
334334

335335
- name: "Checkout phpstan-src"
336336
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
@@ -342,24 +342,24 @@ jobs:
342342
id: git-log
343343
working-directory: phpstan-src
344344
run: |
345-
echo "log<<MESSAGE" >> $GITHUB_OUTPUT
346-
echo "$(git log ${{ steps.previous-commit.outputs.sha }}..${{ github.event.after }} --reverse --pretty='https://github.com/phpstan/phpstan-src/commit/%H %s')" >> $GITHUB_OUTPUT
347-
echo 'MESSAGE' >> $GITHUB_OUTPUT
345+
echo "log<<MESSAGE" >> "$GITHUB_OUTPUT"
346+
git log ${{ steps.previous-commit.outputs.sha }}..${{ github.event.after }} --reverse --pretty='https://github.com/phpstan/phpstan-src/commit/%H %s' >> "$GITHUB_OUTPUT"
347+
echo 'MESSAGE' >> "$GITHUB_OUTPUT"
348348
349349
- name: "Get short phpstan-src SHA"
350350
id: short-src-sha
351351
working-directory: phpstan-src
352-
run: echo "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
352+
run: echo "sha=$(git rev-parse --short=7 HEAD)" >> "$GITHUB_OUTPUT"
353353

354354
- name: "Check PHAR checksum"
355355
id: checksum-difference
356356
working-directory: phpstan-dist
357357
run: |
358-
checksum=${{needs.compiler-tests.outputs.checksum}}
358+
checksum="${{needs.compiler-tests.outputs.checksum}}"
359359
if [[ $(head -n 1 .phar-checksum) != "$checksum" ]]; then
360-
echo "result=different" >> $GITHUB_OUTPUT
360+
echo "result=different" >> "$GITHUB_OUTPUT"
361361
else
362-
echo "result=same" >> $GITHUB_OUTPUT
362+
echo "result=same" >> "$GITHUB_OUTPUT"
363363
fi
364364
365365
- name: "Download phpstan.phar"

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,6 @@ jobs:
185185

186186
- name: "Generate baseline"
187187
run: |
188-
> phpstan-baseline.neon && \
188+
true > phpstan-baseline.neon && \
189189
make phpstan-generate-baseline-php && \
190190
make phpstan-result-cache

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
- uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3
172172

173173
- id: set-matrix
174-
run: echo "matrix=$(php .github/workflows/tests-levels-matrix.php)" >> $GITHUB_OUTPUT
174+
run: echo "matrix=$(php .github/workflows/tests-levels-matrix.php)" >> "$GITHUB_OUTPUT"
175175

176176
outputs:
177177
matrix: ${{ steps.set-matrix.outputs.matrix }}
@@ -325,12 +325,12 @@ jobs:
325325
--source-directory='build/PHPStan/Build' \
326326
--timeout=500 \
327327
> infection.json5
328-
cat infection.json5 | jq
328+
jq < infection.json5
329329
330330
- name: "Determine default branch"
331331
id: default-branch
332332
run: |
333-
echo "name=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')" >> $GITHUB_OUTPUT
333+
echo "name=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')" >> "$GITHUB_OUTPUT"
334334
335335
- name: "Restore result cache"
336336
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0

.github/workflows/update-phpstorm-stubs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
path: "phpstorm-stubs"
4040
repository: "jetbrains/phpstorm-stubs"
4141
- name: "Update stubs"
42-
run: "composer require jetbrains/phpstorm-stubs:dev-master#$(git -C phpstorm-stubs rev-parse HEAD)"
42+
run: "composer require \"jetbrains/phpstorm-stubs:dev-master#$(git -C phpstorm-stubs rev-parse HEAD)\""
4343
- name: "Remove stubs repo"
4444
run: "rm -r phpstorm-stubs"
4545
- name: "Update function metadata"

0 commit comments

Comments
 (0)