diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index 98f562fd00b767..48283059c5118c 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -22,18 +22,17 @@ jobs: pull-requests: read if: github.repository == 'nodejs/node' runs-on: ubuntu-latest - outputs: - numbers: ${{ steps.get_prs_for_ci.outputs.numbers }} steps: - 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_ENV env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} start-ci: @@ -41,7 +40,7 @@ jobs: contents: read pull-requests: write needs: get-prs-for-ci - if: needs.get-prs-for-ci.outputs.numbers != '' + if: env.numbers != '' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -65,6 +64,6 @@ jobs: ncu-config set repo "$(echo ${{ github.repository }} | cut -d/ -f2)" - name: Start the CI - run: ./tools/actions/start-ci.sh ${{ needs.get-prs-for-ci.outputs.numbers }} + run: ./tools/actions/start-ci.sh ${{ env.numbers }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index 738a034aecb017..e983327166c3e9 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -15,11 +15,11 @@ 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_ENV + echo "minusOne=$((${{ github.event.pull_request.commits }} - 1))" >> $GITHUB_ENV - uses: actions/checkout@v3 with: - fetch-depth: ${{ steps.nb-of-commits.outputs.plusOne }} + fetch-depth: ${{ env.plusOne }} persist-credentials: false - run: git reset HEAD^2 - name: Install Node.js @@ -29,4 +29,4 @@ jobs: - name: Validate commit message run: | echo "::add-matcher::.github/workflows/commit-lint-problem-matcher.json" - git rev-parse HEAD~${{ steps.nb-of-commits.outputs.minusOne }} | xargs npx -q core-validate-commit --no-validate-metadata --tap + git rev-parse HEAD~${{ env.minusOne }} | xargs npx -q core-validate-commit --no-validate-metadata --tap diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml index ac57fbb0e01f4f..6fd6e0eb455ff5 100644 --- a/.github/workflows/commit-queue.yml +++ b/.github/workflows/commit-queue.yml @@ -27,24 +27,23 @@ jobs: pull-requests: read if: github.repository == 'nodejs/node' runs-on: ubuntu-latest - outputs: - numbers: ${{ steps.get_mergeable_prs.outputs.numbers }} steps: - 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_ENV env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} commitQueue: needs: get_mergeable_prs - if: needs.get_mergeable_prs.outputs.numbers != '' + if: env.numbers != '' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -82,6 +81,6 @@ jobs: ncu-config set owner "${OWNER}" - name: Start the Commit Queue - run: ./tools/actions/commit-queue.sh ${{ env.OWNER }} ${{ env.REPOSITORY }} ${{ needs.get_mergeable_prs.outputs.numbers }} + run: ./tools/actions/commit-queue.sh ${{ env.OWNER }} ${{ env.REPOSITORY }} ${{ env.numbers }} env: GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} diff --git a/.github/workflows/label-flaky-test-issue.yml b/.github/workflows/label-flaky-test-issue.yml index 490d0826fb53aa..0d52f3a1428985 100644 --- a/.github/workflows/label-flaky-test-issue.yml +++ b/.github/workflows/label-flaky-test-issue.yml @@ -41,10 +41,10 @@ jobs: labels="${labels}${platform2label[$platform]},"; \ done; - echo "::set-output name=LABELS::${labels::-1}" + echo "LABELS=${labels::-1}" >> $GITHUB_ENV - name: Add labels env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NUMBER: ${{ github.event.issue.number }} - run: gh issue edit "$NUMBER" --repo ${{ github.repository }} --add-label "${{ steps.extract-labels.outputs.LABELS }}" + run: gh issue edit "$NUMBER" --repo ${{ github.repository }} --add-label "${{ env.LABELS }}"