Skip to content

Commit

Permalink
ci: Use GITHUB_OUTPUT envvar instead of set-output command (#958)
Browse files Browse the repository at this point in the history
* ci: Use GITHUB_OUTPUT envvar instead of set-output command

* Quote envvar to match documentation
  • Loading branch information
arunsathiya authored Feb 16, 2024
1 parent 01ee0f5 commit d3b17a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/label-version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand All @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/new-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit d3b17a2

Please sign in to comment.