Skip to content

Commit a70b276

Browse files
lpincaRafaelGSS
authored andcommitted
tools: do not use the set-output command in workflows
The `set-output` command is deprecated. Use the `GITHUB_OUTPUT` environment file. Refs: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ PR-URL: #45024 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent d41f8ff commit a70b276

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.github/workflows/auto-start-ci.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ jobs:
2828
- name: Get Pull Requests
2929
id: get_prs_for_ci
3030
run: >
31-
gh pr list \
31+
numbers=$(gh pr list \
3232
--repo ${{ github.repository }} \
3333
--label 'request-ci' \
3434
--json 'number' \
35-
-t '::set-output name=numbers::{{ range . }}{{ .number }} {{ end }}' \
36-
--limit 100
35+
-t '{{ range . }}{{ .number }} {{ end }}' \
36+
--limit 100)
37+
echo "numbers=$numbers" >> $GITHUB_OUTPUT
3738
env:
3839
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3940
start-ci:

.github/workflows/commit-lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- name: Compute number of commits in the PR
1616
id: nb-of-commits
1717
run: |
18-
echo "::set-output name=plusOne::$((${{ github.event.pull_request.commits }} + 1))"
19-
echo "::set-output name=minusOne::$((${{ github.event.pull_request.commits }} - 1))"
18+
echo "plusOne=$((${{ github.event.pull_request.commits }} + 1))" >> $GITHUB_OUTPUT
19+
echo "minusOne=$((${{ github.event.pull_request.commits }} - 1))" >> $GITHUB_OUTPUT
2020
- uses: actions/checkout@v3
2121
with:
2222
fetch-depth: ${{ steps.nb-of-commits.outputs.plusOne }}

.github/workflows/commit-queue.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ jobs:
3333
- name: Get Pull Requests
3434
id: get_mergeable_prs
3535
run: >
36-
gh pr list \
36+
numbers=$(gh pr list \
3737
--repo ${{ github.repository }} \
3838
--base ${{ github.ref_name }} \
3939
--label 'commit-queue' \
4040
--json 'number' \
41-
-t '::set-output name=numbers::{{ range . }}{{ .number }} {{ end }}' \
42-
--limit 100
41+
-t '{{ range . }}{{ .number }} {{ end }}' \
42+
--limit 100)
43+
echo "numbers=$numbers" >> $GITHUB_OUTPUT
4344
env:
4445
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4546
commitQueue:

.github/workflows/label-flaky-test-issue.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
labels="${labels}${platform2label[$platform]},"; \
4242
done;
4343
44-
echo "::set-output name=LABELS::${labels::-1}"
44+
echo "LABELS=${labels::-1}" >> $GITHUB_OUTPUT
4545
4646
- name: Add labels
4747
env:

0 commit comments

Comments
 (0)