mirror of https://github.com/nodejs/node.git
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: https://github.com/nodejs/node/pull/45024 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>pull/45075/head
parent
87cdf7d412
commit
7ed44db558
|
@ -28,12 +28,13 @@ jobs:
|
|||
- name: Get Pull Requests
|
||||
id: get_prs_for_ci
|
||||
run: >
|
||||
gh pr list \
|
||||
numbers=$(gh pr list \
|
||||
--repo ${{ github.repository }} \
|
||||
--label 'request-ci' \
|
||||
--json 'number' \
|
||||
-t '::set-output name=numbers::{{ range . }}{{ .number }} {{ end }}' \
|
||||
--limit 100
|
||||
-t '{{ range . }}{{ .number }} {{ end }}' \
|
||||
--limit 100)
|
||||
echo "numbers=$numbers" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
start-ci:
|
||||
|
|
|
@ -15,8 +15,8 @@ jobs:
|
|||
- name: Compute number of commits in the PR
|
||||
id: nb-of-commits
|
||||
run: |
|
||||
echo "::set-output name=plusOne::$((${{ github.event.pull_request.commits }} + 1))"
|
||||
echo "::set-output name=minusOne::$((${{ github.event.pull_request.commits }} - 1))"
|
||||
echo "plusOne=$((${{ github.event.pull_request.commits }} + 1))" >> $GITHUB_OUTPUT
|
||||
echo "minusOne=$((${{ github.event.pull_request.commits }} - 1))" >> $GITHUB_OUTPUT
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: ${{ steps.nb-of-commits.outputs.plusOne }}
|
||||
|
|
|
@ -33,13 +33,14 @@ jobs:
|
|||
- name: Get Pull Requests
|
||||
id: get_mergeable_prs
|
||||
run: >
|
||||
gh pr list \
|
||||
numbers=$(gh pr list \
|
||||
--repo ${{ github.repository }} \
|
||||
--base ${{ github.ref_name }} \
|
||||
--label 'commit-queue' \
|
||||
--json 'number' \
|
||||
-t '::set-output name=numbers::{{ range . }}{{ .number }} {{ end }}' \
|
||||
--limit 100
|
||||
-t '{{ range . }}{{ .number }} {{ end }}' \
|
||||
--limit 100)
|
||||
echo "numbers=$numbers" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
commitQueue:
|
||||
|
|
|
@ -41,7 +41,7 @@ jobs:
|
|||
labels="${labels}${platform2label[$platform]},"; \
|
||||
done;
|
||||
|
||||
echo "::set-output name=LABELS::${labels::-1}"
|
||||
echo "LABELS=${labels::-1}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Add labels
|
||||
env:
|
||||
|
|
Loading…
Reference in New Issue