Merge pull request #13994 from Homebrew/set-output-deprecation

workflows: migrate from deprecated set-output
This commit is contained in:
Bo Anderson 2022-10-12 12:13:40 +01:00 committed by GitHub
commit 77311e4045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -41,7 +41,7 @@ jobs:
git fetch origin git fetch origin
BRANCH="sorbet-files-update" BRANCH="sorbet-files-update"
echo "::set-output name=branch::${BRANCH}" echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
if git ls-remote --exit-code --heads origin "${BRANCH}" if git ls-remote --exit-code --heads origin "${BRANCH}"
then then
@ -57,11 +57,11 @@ jobs:
git add "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet" git add "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet"
git commit -m "sorbet: Update RBI files." \ git commit -m "sorbet: Update RBI files." \
-m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow." -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")" PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")"
if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]] if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]]
then then
echo "::set-output name=pull_request::true" echo "pull_request=true" >> $GITHUB_OUTPUT
fi fi
fi fi

View File

@ -40,7 +40,7 @@ jobs:
git fetch origin git fetch origin
BRANCH="spdx-update" BRANCH="spdx-update"
echo "::set-output name=branch::${BRANCH}" echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
if git ls-remote --exit-code --heads origin "${BRANCH}" if git ls-remote --exit-code --heads origin "${BRANCH}"
then then
@ -54,11 +54,11 @@ jobs:
then then
git add "${GITHUB_WORKSPACE}/Library/Homebrew/data/spdx" 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)." 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")" PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")"
if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]] if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]]
then then
echo "::set-output name=pull_request::true" echo "pull_request=true" >> $GITHUB_OUTPUT
fi fi
fi fi

View File

@ -56,7 +56,7 @@ jobs:
else else
BRANCH=sponsors-maintainers-man-completions BRANCH=sponsors-maintainers-man-completions
fi fi
echo "::set-output name=branch::${BRANCH}" echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
if git ls-remote --exit-code --heads origin "${BRANCH}" if git ls-remote --exit-code --heads origin "${BRANCH}"
then then
@ -100,11 +100,11 @@ jobs:
if [[ -n "$COMMITTED" ]] if [[ -n "$COMMITTED" ]]
then then
echo "::set-output name=committed::true" echo "committed=true" >> $GITHUB_OUTPUT
PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")" PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")"
if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]] if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]]
then then
echo "::set-output name=pull_request::true" echo "pull_request=true" >> $GITHUB_OUTPUT
fi fi
fi fi
env: env:

View File

@ -43,10 +43,10 @@ jobs:
gh pr checkout '${{ github.event.pull_request.number || github.event.inputs.pull_request }}' gh pr checkout '${{ github.event.pull_request.number || github.event.inputs.pull_request }}'
branch="$(git branch --show-current)" 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|')" 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: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}