From d3b17a2f436ecf49fd5addd3e4d6a3a6f54093c9 Mon Sep 17 00:00:00 2001 From: Arun Sathiya Date: Fri, 16 Feb 2024 03:26:34 -0800 Subject: [PATCH] ci: Use GITHUB_OUTPUT envvar instead of set-output command (#958) * ci: Use GITHUB_OUTPUT envvar instead of set-output command * Quote envvar to match documentation --- .github/workflows/cd.yml | 2 +- .github/workflows/label-version-bump.yml | 6 +++--- .github/workflows/new-pr.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d53ce17fb..1350efb92 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -121,7 +121,7 @@ jobs: id: pnpm-upgrade run: | OUTGOING_VERSION=$(jq '.dependencies["posthog-js"]' package.json -r) - echo "::set-output name=outgoing-version::$OUTGOING_VERSION" + echo "outgoing-version=$OUTGOING_VERSION" >> "$GITHUB_OUTPUT" for i in $(seq 1 $RETRY_TIMES); do # Retry loop because of npm being _eventually_ consistent if pnpm upgrade posthog-js@${{ env.COMMITTED_VERSION }}; then diff --git a/.github/workflows/label-version-bump.yml b/.github/workflows/label-version-bump.yml index 9456c5830..e57d312d5 100644 --- a/.github/workflows/label-version-bump.yml +++ b/.github/workflows/label-version-bump.yml @@ -40,7 +40,7 @@ jobs: if [[ $BUMP_MAJOR_PRESENT == 'true' ]]; then BUMP_TYPE=major fi - echo "::set-output name=bump-type::$BUMP_TYPE" + echo "bump-type=$BUMP_TYPE" >> "$GITHUB_OUTPUT" env: BUMP_PATCH_PRESENT: ${{ contains(github.event.pull_request.labels.*.name, 'bump patch') }} BUMP_MINOR_PRESENT: ${{ contains(github.event.pull_request.labels.*.name, 'bump minor') }} @@ -52,8 +52,8 @@ jobs: run: | OLD_VERSION=$(jq ".version" package.json -r) NEW_VERSION=$(npx semver $OLD_VERSION -i ${{ steps.bump-type.outputs.bump-type }}) - echo "::set-output name=old-version::$OLD_VERSION" - echo "::set-output name=new-version::$NEW_VERSION" + echo "old-version=$OLD_VERSION" >> "$GITHUB_OUTPUT" + echo "new-version=$NEW_VERSION" >> "$GITHUB_OUTPUT" - name: Update version in package.json if: steps.bump-type.outputs.bump-type != 'null' diff --git a/.github/workflows/new-pr.yml b/.github/workflows/new-pr.yml index 348abdaaf..0fb722bbc 100644 --- a/.github/workflows/new-pr.yml +++ b/.github/workflows/new-pr.yml @@ -19,9 +19,9 @@ jobs: ) echo "::debug::Filtered PR body to $FILTERED_BODY" if [[ -z "${FILTERED_BODY//[[:space:]]/}" ]]; then - echo "::set-output name=is-shame-worthy::true" + echo "is-shame-worthy=true" >> "$GITHUB_OUTPUT" else - echo "::set-output name=is-shame-worthy::false" + echo "is-shame-worthy=false" >> "$GITHUB_OUTPUT" fi env: RAW_BODY: ${{ github.event.pull_request.body }}