From 3867038ab7f8461445326ad5c8a164eec2578515 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Tue, 11 Oct 2022 20:11:15 +0100 Subject: [PATCH] workflows: migrate from deprecated set-output --- .github/workflows/sorbet.yml | 6 +++--- .github/workflows/spdx.yml | 6 +++--- .github/workflows/sponsors-maintainers-man-completions.yml | 6 +++--- .github/workflows/vendor-gems.yml | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sorbet.yml b/.github/workflows/sorbet.yml index 72902fade0..ab46d81514 100644 --- a/.github/workflows/sorbet.yml +++ b/.github/workflows/sorbet.yml @@ -41,7 +41,7 @@ jobs: git fetch origin BRANCH="sorbet-files-update" - echo "::set-output name=branch::${BRANCH}" + echo "branch=${BRANCH}" >> $GITHUB_OUTPUT if git ls-remote --exit-code --heads origin "${BRANCH}" then @@ -57,11 +57,11 @@ jobs: git add "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet" git commit -m "sorbet: Update RBI files." \ -m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow." - echo "::set-output name=committed::true" + echo "committed=true" >> $GITHUB_OUTPUT PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")" if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]] then - echo "::set-output name=pull_request::true" + echo "pull_request=true" >> $GITHUB_OUTPUT fi fi diff --git a/.github/workflows/spdx.yml b/.github/workflows/spdx.yml index 444ca4d001..fbd2527a07 100644 --- a/.github/workflows/spdx.yml +++ b/.github/workflows/spdx.yml @@ -40,7 +40,7 @@ jobs: git fetch origin BRANCH="spdx-update" - echo "::set-output name=branch::${BRANCH}" + echo "branch=${BRANCH}" >> $GITHUB_OUTPUT if git ls-remote --exit-code --heads origin "${BRANCH}" then @@ -54,11 +54,11 @@ jobs: then git add "${GITHUB_WORKSPACE}/Library/Homebrew/data/spdx" git commit -m "spdx: update license data." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/spdx.yml)." - echo "::set-output name=committed::true" + echo "committed=true" >> $GITHUB_OUTPUT PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")" if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]] then - echo "::set-output name=pull_request::true" + echo "pull_request=true" >> $GITHUB_OUTPUT fi fi diff --git a/.github/workflows/sponsors-maintainers-man-completions.yml b/.github/workflows/sponsors-maintainers-man-completions.yml index a1187a4832..e46a555531 100644 --- a/.github/workflows/sponsors-maintainers-man-completions.yml +++ b/.github/workflows/sponsors-maintainers-man-completions.yml @@ -56,7 +56,7 @@ jobs: else BRANCH=sponsors-maintainers-man-completions fi - echo "::set-output name=branch::${BRANCH}" + echo "branch=${BRANCH}" >> $GITHUB_OUTPUT if git ls-remote --exit-code --heads origin "${BRANCH}" then @@ -100,11 +100,11 @@ jobs: if [[ -n "$COMMITTED" ]] then - echo "::set-output name=committed::true" + echo "committed=true" >> $GITHUB_OUTPUT PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")" if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]] then - echo "::set-output name=pull_request::true" + echo "pull_request=true" >> $GITHUB_OUTPUT fi fi env: diff --git a/.github/workflows/vendor-gems.yml b/.github/workflows/vendor-gems.yml index 08ec0ded89..204ceeed17 100644 --- a/.github/workflows/vendor-gems.yml +++ b/.github/workflows/vendor-gems.yml @@ -43,10 +43,10 @@ jobs: gh pr checkout '${{ github.event.pull_request.number || github.event.inputs.pull_request }}' branch="$(git branch --show-current)" - echo "::set-output name=branch::${branch}" + echo "branch=${branch}" >> $GITHUB_OUTPUT gem_name="$(echo "${branch}" | sed -E 's|.*/||;s|(.*)-.*$|\1|')" - echo "::set-output name=gem_name::${gem_name}" + echo "gem_name=${gem_name}" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}