Skip to content

Commit dc73ffe

Browse files
authored
fix: remove deprecated set-output in favor of GITHUB_OUTPUT (#281)
See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ for more info
1 parent f283d4a commit dc73ffe

File tree

5 files changed

+35
-35
lines changed

5 files changed

+35
-35
lines changed

.github/workflows/post-dependabot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ jobs:
4848
run: |
4949
dependabot_dir="${{ steps.metadata.outputs.directory }}"
5050
if [[ "$dependabot_dir" == "/" ]]; then
51-
echo "::set-output name=workspace::-iwr"
51+
echo "workspace=-iwr" >> $GITHUB_OUTPUT
5252
else
5353
# strip leading slash from directory so it works as a
5454
# a path to the workspace flag
55-
echo "::set-output name=workspace::-w ${dependabot_dir#/}"
55+
echo "workspace=-w ${dependabot_dir#/}" >> $GITHUB_OUTPUT
5656
fi
5757
5858
- name: Apply Changes
@@ -61,7 +61,7 @@ jobs:
6161
run: |
6262
npm run template-oss-apply ${{ steps.flags.outputs.workspace }}
6363
if [[ `git status --porcelain` ]]; then
64-
echo "::set-output name=changes::true"
64+
echo "changes=true" >> $GITHUB_OUTPUT
6565
fi
6666
# This only sets the conventional commit prefix. This workflow can't reliably determine
6767
# what the breaking change is though. If a BREAKING CHANGE message is required then
@@ -71,7 +71,7 @@ jobs:
7171
else
7272
prefix='chore'
7373
fi
74-
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
74+
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
7575
7676
# This step will fail if template-oss has made any workflow updates. It is impossible
7777
# for a workflow to update other workflows. In the case it does fail, we continue

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
run: |
181181
git commit --all --amend --no-edit || true
182182
git push --force-with-lease
183-
echo "::set-output name=sha::$(git rev-parse HEAD)"
183+
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
184184
- name: Get Workflow Job
185185
uses: actions/github-script@v6
186186
if: steps.commit.outputs.sha
@@ -261,7 +261,7 @@ jobs:
261261
else
262262
result="success"
263263
fi
264-
echo "::set-output name=result::$result"
264+
echo "result=$result" >> $GITHUB_OUTPUT
265265
- name: Conclude Check
266266
uses: LouisBrunner/[email protected]
267267
if: needs.update.outputs.check-id && always()
@@ -376,7 +376,7 @@ jobs:
376376
else
377377
result="white_check_mark"
378378
fi
379-
echo "::set-output name=result::$result"
379+
echo "result=$result" >> $GITHUB_OUTPUT
380380
- name: Update Release PR Comment
381381
uses: actions/github-script@v6
382382
env:

lib/content/post-dependabot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
run: |
2828
dependabot_dir="$\{{ steps.metadata.outputs.directory }}"
2929
if [[ "$dependabot_dir" == "/" ]]; then
30-
echo "::set-output name=workspace::-iwr"
30+
echo "workspace=-iwr" >> $GITHUB_OUTPUT
3131
else
3232
# strip leading slash from directory so it works as a
3333
# a path to the workspace flag
34-
echo "::set-output name=workspace::-w ${dependabot_dir#/}"
34+
echo "workspace=-w ${dependabot_dir#/}" >> $GITHUB_OUTPUT
3535
fi
3636
3737
- name: Apply Changes
@@ -40,7 +40,7 @@ jobs:
4040
run: |
4141
{{ rootNpmPath }} run template-oss-apply $\{{ steps.flags.outputs.workspace }}
4242
if [[ `git status --porcelain` ]]; then
43-
echo "::set-output name=changes::true"
43+
echo "changes=true" >> $GITHUB_OUTPUT
4444
fi
4545
# This only sets the conventional commit prefix. This workflow can't reliably determine
4646
# what the breaking change is though. If a BREAKING CHANGE message is required then
@@ -50,7 +50,7 @@ jobs:
5050
else
5151
prefix='chore'
5252
fi
53-
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
53+
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
5454
5555
# This step will fail if template-oss has made any workflow updates. It is impossible
5656
# for a workflow to update other workflows. In the case it does fail, we continue

lib/content/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
run: |
9595
git commit --all --amend --no-edit || true
9696
git push --force-with-lease
97-
echo "::set-output name=sha::$(git rev-parse HEAD)"
97+
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
9898
{{> stepChecks jobName="Update - Release" jobCheck=(obj sha="steps.commit.outputs.sha" name="Release" )}}
9999
{{> stepChecks jobCheck=(obj id="needs.release.outputs.check-id" )}}
100100

@@ -121,7 +121,7 @@ jobs:
121121
else
122122
result="success"
123123
fi
124-
echo "::set-output name=result::$result"
124+
echo "result=$result" >> $GITHUB_OUTPUT
125125
{{> stepChecks jobCheck=(obj id="needs.update.outputs.check-id" status="steps.needs-result.outputs.result") }}
126126

127127
post-release:
@@ -180,7 +180,7 @@ jobs:
180180
else
181181
result="white_check_mark"
182182
fi
183-
echo "::set-output name=result::$result"
183+
echo "result=$result" >> $GITHUB_OUTPUT
184184
- name: Update Release PR Comment
185185
uses: actions/github-script@v6
186186
env:

tap-snapshots/test/apply/source-snapshots.js.test.cjs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -627,11 +627,11 @@ jobs:
627627
run: |
628628
dependabot_dir="\${{ steps.metadata.outputs.directory }}"
629629
if [[ "$dependabot_dir" == "/" ]]; then
630-
echo "::set-output name=workspace::-iwr"
630+
echo "workspace=-iwr" >> $GITHUB_OUTPUT
631631
else
632632
# strip leading slash from directory so it works as a
633633
# a path to the workspace flag
634-
echo "::set-output name=workspace::-w \${dependabot_dir#/}"
634+
echo "workspace=-w \${dependabot_dir#/}" >> $GITHUB_OUTPUT
635635
fi
636636
637637
- name: Apply Changes
@@ -640,7 +640,7 @@ jobs:
640640
run: |
641641
npm run template-oss-apply \${{ steps.flags.outputs.workspace }}
642642
if [[ \`git status --porcelain\` ]]; then
643-
echo "::set-output name=changes::true"
643+
echo "changes=true" >> $GITHUB_OUTPUT
644644
fi
645645
# This only sets the conventional commit prefix. This workflow can't reliably determine
646646
# what the breaking change is though. If a BREAKING CHANGE message is required then
@@ -650,7 +650,7 @@ jobs:
650650
else
651651
prefix='chore'
652652
fi
653-
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
653+
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
654654
655655
# This step will fail if template-oss has made any workflow updates. It is impossible
656656
# for a workflow to update other workflows. In the case it does fail, we continue
@@ -934,7 +934,7 @@ jobs:
934934
run: |
935935
git commit --all --amend --no-edit || true
936936
git push --force-with-lease
937-
echo "::set-output name=sha::$(git rev-parse HEAD)"
937+
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
938938
- name: Get Workflow Job
939939
uses: actions/github-script@v6
940940
if: steps.commit.outputs.sha
@@ -1015,7 +1015,7 @@ jobs:
10151015
else
10161016
result="success"
10171017
fi
1018-
echo "::set-output name=result::$result"
1018+
echo "result=$result" >> $GITHUB_OUTPUT
10191019
- name: Conclude Check
10201020
uses: LouisBrunner/[email protected]
10211021
if: needs.update.outputs.check-id && always()
@@ -1130,7 +1130,7 @@ jobs:
11301130
else
11311131
result="white_check_mark"
11321132
fi
1133-
echo "::set-output name=result::$result"
1133+
echo "result=$result" >> $GITHUB_OUTPUT
11341134
- name: Update Release PR Comment
11351135
uses: actions/github-script@v6
11361136
env:
@@ -2212,11 +2212,11 @@ jobs:
22122212
run: |
22132213
dependabot_dir="\${{ steps.metadata.outputs.directory }}"
22142214
if [[ "$dependabot_dir" == "/" ]]; then
2215-
echo "::set-output name=workspace::-iwr"
2215+
echo "workspace=-iwr" >> $GITHUB_OUTPUT
22162216
else
22172217
# strip leading slash from directory so it works as a
22182218
# a path to the workspace flag
2219-
echo "::set-output name=workspace::-w \${dependabot_dir#/}"
2219+
echo "workspace=-w \${dependabot_dir#/}" >> $GITHUB_OUTPUT
22202220
fi
22212221
22222222
- name: Apply Changes
@@ -2225,7 +2225,7 @@ jobs:
22252225
run: |
22262226
npm run template-oss-apply \${{ steps.flags.outputs.workspace }}
22272227
if [[ \`git status --porcelain\` ]]; then
2228-
echo "::set-output name=changes::true"
2228+
echo "changes=true" >> $GITHUB_OUTPUT
22292229
fi
22302230
# This only sets the conventional commit prefix. This workflow can't reliably determine
22312231
# what the breaking change is though. If a BREAKING CHANGE message is required then
@@ -2235,7 +2235,7 @@ jobs:
22352235
else
22362236
prefix='chore'
22372237
fi
2238-
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
2238+
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
22392239
22402240
# This step will fail if template-oss has made any workflow updates. It is impossible
22412241
# for a workflow to update other workflows. In the case it does fail, we continue
@@ -2519,7 +2519,7 @@ jobs:
25192519
run: |
25202520
git commit --all --amend --no-edit || true
25212521
git push --force-with-lease
2522-
echo "::set-output name=sha::$(git rev-parse HEAD)"
2522+
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
25232523
- name: Get Workflow Job
25242524
uses: actions/github-script@v6
25252525
if: steps.commit.outputs.sha
@@ -2600,7 +2600,7 @@ jobs:
26002600
else
26012601
result="success"
26022602
fi
2603-
echo "::set-output name=result::$result"
2603+
echo "result=$result" >> $GITHUB_OUTPUT
26042604
- name: Conclude Check
26052605
uses: LouisBrunner/[email protected]
26062606
if: needs.update.outputs.check-id && always()
@@ -2715,7 +2715,7 @@ jobs:
27152715
else
27162716
result="white_check_mark"
27172717
fi
2718-
echo "::set-output name=result::$result"
2718+
echo "result=$result" >> $GITHUB_OUTPUT
27192719
- name: Update Release PR Comment
27202720
uses: actions/github-script@v6
27212721
env:
@@ -3640,11 +3640,11 @@ jobs:
36403640
run: |
36413641
dependabot_dir="\${{ steps.metadata.outputs.directory }}"
36423642
if [[ "$dependabot_dir" == "/" ]]; then
3643-
echo "::set-output name=workspace::-iwr"
3643+
echo "workspace=-iwr" >> $GITHUB_OUTPUT
36443644
else
36453645
# strip leading slash from directory so it works as a
36463646
# a path to the workspace flag
3647-
echo "::set-output name=workspace::-w \${dependabot_dir#/}"
3647+
echo "workspace=-w \${dependabot_dir#/}" >> $GITHUB_OUTPUT
36483648
fi
36493649
36503650
- name: Apply Changes
@@ -3653,7 +3653,7 @@ jobs:
36533653
run: |
36543654
npm run template-oss-apply \${{ steps.flags.outputs.workspace }}
36553655
if [[ \`git status --porcelain\` ]]; then
3656-
echo "::set-output name=changes::true"
3656+
echo "changes=true" >> $GITHUB_OUTPUT
36573657
fi
36583658
# This only sets the conventional commit prefix. This workflow can't reliably determine
36593659
# what the breaking change is though. If a BREAKING CHANGE message is required then
@@ -3663,7 +3663,7 @@ jobs:
36633663
else
36643664
prefix='chore'
36653665
fi
3666-
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
3666+
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
36673667
36683668
# This step will fail if template-oss has made any workflow updates. It is impossible
36693669
# for a workflow to update other workflows. In the case it does fail, we continue
@@ -3947,7 +3947,7 @@ jobs:
39473947
run: |
39483948
git commit --all --amend --no-edit || true
39493949
git push --force-with-lease
3950-
echo "::set-output name=sha::$(git rev-parse HEAD)"
3950+
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
39513951
- name: Get Workflow Job
39523952
uses: actions/github-script@v6
39533953
if: steps.commit.outputs.sha
@@ -4028,7 +4028,7 @@ jobs:
40284028
else
40294029
result="success"
40304030
fi
4031-
echo "::set-output name=result::$result"
4031+
echo "result=$result" >> $GITHUB_OUTPUT
40324032
- name: Conclude Check
40334033
uses: LouisBrunner/[email protected]
40344034
if: needs.update.outputs.check-id && always()
@@ -4143,7 +4143,7 @@ jobs:
41434143
else
41444144
result="white_check_mark"
41454145
fi
4146-
echo "::set-output name=result::$result"
4146+
echo "result=$result" >> $GITHUB_OUTPUT
41474147
- name: Update Release PR Comment
41484148
uses: actions/github-script@v6
41494149
env:

0 commit comments

Comments
 (0)