workflows: migrate from deprecated set-output

This commit is contained in:
Bo Anderson 2022-10-11 20:11:15 +01:00
parent bde685aae2
commit 3867038ab7
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
4 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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 }}