From 27b9dfae832d695f596993dd021303b4f59ed431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= <91831478+lemeurherve@users.noreply.github.com> Date: Sat, 2 Mar 2024 15:45:10 +0100 Subject: [PATCH] chore(GHA): address `set-output` deprecation (#1568) --- .github/workflows/latest-weekly.yaml | 6 ++---- .github/workflows/plugins-update.yaml | 12 ++++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/latest-weekly.yaml b/.github/workflows/latest-weekly.yaml index 2b2e0ec1..f188f4fb 100644 --- a/.github/workflows/latest-weekly.yaml +++ b/.github/workflows/latest-weekly.yaml @@ -24,12 +24,10 @@ jobs: - name: Calculate Diff id: diff run: | - git diff - if [[ $(git diff --stat) != '' ]]; then - echo "::set-output name=changed::true" + echo "changed=true" >> $GITHUB_OUTPUT else - echo "::set-output name=changed::false" + echo "changed=false" >> $GITHUB_OUTPUT fi - name: Update plugins run: ./bin/update-plugins.sh diff --git a/.github/workflows/plugins-update.yaml b/.github/workflows/plugins-update.yaml index ac624cc5..585a5b32 100644 --- a/.github/workflows/plugins-update.yaml +++ b/.github/workflows/plugins-update.yaml @@ -24,9 +24,9 @@ jobs: app_id: ${{ secrets.JENKINS_ADMIN_APP_ID }} private_key: ${{ secrets.JENKINS_ADMIN_APP_PRIVKEY }} - - run: echo "::set-output name=stdout::$(./bin/update-plugins.sh plugins-infra.ci.jenkins.io.txt)\n" - id: update-infra-ci-plugins + - id: update-infra-ci-plugins name: Update infra-ci plugins + run: echo "stdout=$(./bin/update-plugins.sh plugins-infra.ci.jenkins.io.txt)" >> $GITHUB_OUTPUT - name: Create infra.ci.jenkins.io Pull Request id: cpr-infra-ci @@ -43,12 +43,12 @@ jobs: body: | Changes: ```diff - ${{ steps.update-plugins.outputs.stdout }} + ${{ steps.update-infra-ci-plugins.outputs.stdout }} ``` - - run: echo "::set-output name=stdout::$(./bin/update-plugins.sh plugins-weekly.ci.jenkins.io.txt)\n" - id: update-weekly-ci-plugins + - id: update-weekly-ci-plugins name: Update weekly-ci plugins + run: echo "stdout=$(./bin/update-plugins.sh plugins-weekly.ci.jenkins.io.txt)" >> $GITHUB_OUTPUT - name: Create weekly.ci.jenkins.io Pull Request id: cpr-weekly-ci @@ -65,5 +65,5 @@ jobs: body: | Changes: ```diff - ${{ steps.update-plugins.outputs.stdout }} + ${{ steps.update-weekly-ci-plugins.outputs.stdout }} ```