From 4056d9e2adadcdf3e87bd27013a08b40bc348dea Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:18:59 +0000 Subject: [PATCH] chore(gha): replace deprecated set-output commands with environment files (#5930) (#6031) to avoid warning messages like Run echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/} Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ (cherry picked from commit 29111887e6e49ac428f35d79917e910118ed9748) Co-authored-by: David Byron <82477955+dbyron-sf@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- .github/workflows/release.yml | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6f714c7807..1bba1c90b4c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,8 +31,8 @@ jobs: - name: Prepare build variables id: build_variables run: | - echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/} - echo ::set-output name=VERSION::"$(git describe --tags --abbrev=0 --match="v[0-9]*" | cut -c2-)-dev-${GITHUB_REF_NAME}-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" + echo REPO="${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT + echo VERSION="$(git describe --tags --abbrev=0 --match='v[0-9]*' | cut -c2-)-dev-${GITHUB_REF_NAME}-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT - name: Build env: ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2f0ac57bcd5..81190273323 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -25,8 +25,8 @@ jobs: - name: Prepare build variables id: build_variables run: | - echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/} - echo ::set-output name=VERSION::"$(git describe --tags --abbrev=0 --match="v[0-9]*" | cut -c2-)-dev-pr-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" + echo REPO="${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT + echo VERSION="$(git describe --tags --abbrev=0 --match='v[0-9]*' | cut -c2-)-dev-pr-$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT - name: Build env: ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66944fe5378..497231bf67d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,15 +32,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | . .github/workflows/release_info.sh ${{ github.event.repository.full_name }} - echo ::set-output name=CHANGELOG::$(echo -e "${CHANGELOG}") - echo ::set-output name=SKIP_RELEASE::${SKIP_RELEASE} - echo ::set-output name=IS_CANDIDATE::${IS_CANDIDATE} - echo ::set-output name=RELEASE_VERSION::${RELEASE_VERSION} + echo CHANGELOG=$(echo -e "${CHANGELOG}") >> $GITHUB_OUTPUT + echo SKIP_RELEASE="${SKIP_RELEASE}" >> $GITHUB_OUTPUT + echo IS_CANDIDATE="${IS_CANDIDATE}" >> $GITHUB_OUTPUT + echo RELEASE_VERSION="${RELEASE_VERSION}" >> $GITHUB_OUTPUT - name: Prepare build variables id: build_variables run: | - echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/} - echo ::set-output name=VERSION::"$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" + echo REPO="${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT + echo VERSION="$(git rev-parse --short HEAD)-$(date --utc +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT - name: Release build env: ORG_GRADLE_PROJECT_version: ${{ steps.release_info.outputs.RELEASE_VERSION }}