Skip to content

Commit

Permalink
fix: remove deprecated set-output in favor of GITHUB_OUTPUT (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Feb 8, 2023
1 parent f283d4a commit dc73ffe
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/post-dependabot.yml
Expand Up @@ -48,11 +48,11 @@ jobs:
run: |
dependabot_dir="${{ steps.metadata.outputs.directory }}"
if [[ "$dependabot_dir" == "/" ]]; then
echo "::set-output name=workspace::-iwr"
echo "workspace=-iwr" >> $GITHUB_OUTPUT
else
# strip leading slash from directory so it works as a
# a path to the workspace flag
echo "::set-output name=workspace::-w ${dependabot_dir#/}"
echo "workspace=-w ${dependabot_dir#/}" >> $GITHUB_OUTPUT
fi
- name: Apply Changes
Expand All @@ -61,7 +61,7 @@ jobs:
run: |
npm run template-oss-apply ${{ steps.flags.outputs.workspace }}
if [[ `git status --porcelain` ]]; then
echo "::set-output name=changes::true"
echo "changes=true" >> $GITHUB_OUTPUT
fi
# This only sets the conventional commit prefix. This workflow can't reliably determine
# what the breaking change is though. If a BREAKING CHANGE message is required then
Expand All @@ -71,7 +71,7 @@ jobs:
else
prefix='chore'
fi
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
# This step will fail if template-oss has made any workflow updates. It is impossible
# for a workflow to update other workflows. In the case it does fail, we continue
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Expand Up @@ -180,7 +180,7 @@ jobs:
run: |
git commit --all --amend --no-edit || true
git push --force-with-lease
echo "::set-output name=sha::$(git rev-parse HEAD)"
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Get Workflow Job
uses: actions/github-script@v6
if: steps.commit.outputs.sha
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
else
result="success"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: needs.update.outputs.check-id && always()
Expand Down Expand Up @@ -376,7 +376,7 @@ jobs:
else
result="white_check_mark"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Update Release PR Comment
uses: actions/github-script@v6
env:
Expand Down
8 changes: 4 additions & 4 deletions lib/content/post-dependabot.yml
Expand Up @@ -27,11 +27,11 @@ jobs:
run: |
dependabot_dir="$\{{ steps.metadata.outputs.directory }}"
if [[ "$dependabot_dir" == "/" ]]; then
echo "::set-output name=workspace::-iwr"
echo "workspace=-iwr" >> $GITHUB_OUTPUT
else
# strip leading slash from directory so it works as a
# a path to the workspace flag
echo "::set-output name=workspace::-w ${dependabot_dir#/}"
echo "workspace=-w ${dependabot_dir#/}" >> $GITHUB_OUTPUT
fi
- name: Apply Changes
Expand All @@ -40,7 +40,7 @@ jobs:
run: |
{{ rootNpmPath }} run template-oss-apply $\{{ steps.flags.outputs.workspace }}
if [[ `git status --porcelain` ]]; then
echo "::set-output name=changes::true"
echo "changes=true" >> $GITHUB_OUTPUT
fi
# This only sets the conventional commit prefix. This workflow can't reliably determine
# what the breaking change is though. If a BREAKING CHANGE message is required then
Expand All @@ -50,7 +50,7 @@ jobs:
else
prefix='chore'
fi
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
# This step will fail if template-oss has made any workflow updates. It is impossible
# for a workflow to update other workflows. In the case it does fail, we continue
Expand Down
6 changes: 3 additions & 3 deletions lib/content/release.yml
Expand Up @@ -94,7 +94,7 @@ jobs:
run: |
git commit --all --amend --no-edit || true
git push --force-with-lease
echo "::set-output name=sha::$(git rev-parse HEAD)"
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
{{> stepChecks jobName="Update - Release" jobCheck=(obj sha="steps.commit.outputs.sha" name="Release" )}}
{{> stepChecks jobCheck=(obj id="needs.release.outputs.check-id" )}}

Expand All @@ -121,7 +121,7 @@ jobs:
else
result="success"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
{{> stepChecks jobCheck=(obj id="needs.update.outputs.check-id" status="steps.needs-result.outputs.result") }}

post-release:
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
else
result="white_check_mark"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Update Release PR Comment
uses: actions/github-script@v6
env:
Expand Down
42 changes: 21 additions & 21 deletions tap-snapshots/test/apply/source-snapshots.js.test.cjs
Expand Up @@ -627,11 +627,11 @@ jobs:
run: |
dependabot_dir="\${{ steps.metadata.outputs.directory }}"
if [[ "$dependabot_dir" == "/" ]]; then
echo "::set-output name=workspace::-iwr"
echo "workspace=-iwr" >> $GITHUB_OUTPUT
else
# strip leading slash from directory so it works as a
# a path to the workspace flag
echo "::set-output name=workspace::-w \${dependabot_dir#/}"
echo "workspace=-w \${dependabot_dir#/}" >> $GITHUB_OUTPUT
fi
- name: Apply Changes
Expand All @@ -640,7 +640,7 @@ jobs:
run: |
npm run template-oss-apply \${{ steps.flags.outputs.workspace }}
if [[ \`git status --porcelain\` ]]; then
echo "::set-output name=changes::true"
echo "changes=true" >> $GITHUB_OUTPUT
fi
# This only sets the conventional commit prefix. This workflow can't reliably determine
# what the breaking change is though. If a BREAKING CHANGE message is required then
Expand All @@ -650,7 +650,7 @@ jobs:
else
prefix='chore'
fi
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
# This step will fail if template-oss has made any workflow updates. It is impossible
# for a workflow to update other workflows. In the case it does fail, we continue
Expand Down Expand Up @@ -934,7 +934,7 @@ jobs:
run: |
git commit --all --amend --no-edit || true
git push --force-with-lease
echo "::set-output name=sha::$(git rev-parse HEAD)"
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Get Workflow Job
uses: actions/github-script@v6
if: steps.commit.outputs.sha
Expand Down Expand Up @@ -1015,7 +1015,7 @@ jobs:
else
result="success"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: needs.update.outputs.check-id && always()
Expand Down Expand Up @@ -1130,7 +1130,7 @@ jobs:
else
result="white_check_mark"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Update Release PR Comment
uses: actions/github-script@v6
env:
Expand Down Expand Up @@ -2212,11 +2212,11 @@ jobs:
run: |
dependabot_dir="\${{ steps.metadata.outputs.directory }}"
if [[ "$dependabot_dir" == "/" ]]; then
echo "::set-output name=workspace::-iwr"
echo "workspace=-iwr" >> $GITHUB_OUTPUT
else
# strip leading slash from directory so it works as a
# a path to the workspace flag
echo "::set-output name=workspace::-w \${dependabot_dir#/}"
echo "workspace=-w \${dependabot_dir#/}" >> $GITHUB_OUTPUT
fi
- name: Apply Changes
Expand All @@ -2225,7 +2225,7 @@ jobs:
run: |
npm run template-oss-apply \${{ steps.flags.outputs.workspace }}
if [[ \`git status --porcelain\` ]]; then
echo "::set-output name=changes::true"
echo "changes=true" >> $GITHUB_OUTPUT
fi
# This only sets the conventional commit prefix. This workflow can't reliably determine
# what the breaking change is though. If a BREAKING CHANGE message is required then
Expand All @@ -2235,7 +2235,7 @@ jobs:
else
prefix='chore'
fi
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
# This step will fail if template-oss has made any workflow updates. It is impossible
# for a workflow to update other workflows. In the case it does fail, we continue
Expand Down Expand Up @@ -2519,7 +2519,7 @@ jobs:
run: |
git commit --all --amend --no-edit || true
git push --force-with-lease
echo "::set-output name=sha::$(git rev-parse HEAD)"
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Get Workflow Job
uses: actions/github-script@v6
if: steps.commit.outputs.sha
Expand Down Expand Up @@ -2600,7 +2600,7 @@ jobs:
else
result="success"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: needs.update.outputs.check-id && always()
Expand Down Expand Up @@ -2715,7 +2715,7 @@ jobs:
else
result="white_check_mark"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Update Release PR Comment
uses: actions/github-script@v6
env:
Expand Down Expand Up @@ -3640,11 +3640,11 @@ jobs:
run: |
dependabot_dir="\${{ steps.metadata.outputs.directory }}"
if [[ "$dependabot_dir" == "/" ]]; then
echo "::set-output name=workspace::-iwr"
echo "workspace=-iwr" >> $GITHUB_OUTPUT
else
# strip leading slash from directory so it works as a
# a path to the workspace flag
echo "::set-output name=workspace::-w \${dependabot_dir#/}"
echo "workspace=-w \${dependabot_dir#/}" >> $GITHUB_OUTPUT
fi
- name: Apply Changes
Expand All @@ -3653,7 +3653,7 @@ jobs:
run: |
npm run template-oss-apply \${{ steps.flags.outputs.workspace }}
if [[ \`git status --porcelain\` ]]; then
echo "::set-output name=changes::true"
echo "changes=true" >> $GITHUB_OUTPUT
fi
# This only sets the conventional commit prefix. This workflow can't reliably determine
# what the breaking change is though. If a BREAKING CHANGE message is required then
Expand All @@ -3663,7 +3663,7 @@ jobs:
else
prefix='chore'
fi
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
# This step will fail if template-oss has made any workflow updates. It is impossible
# for a workflow to update other workflows. In the case it does fail, we continue
Expand Down Expand Up @@ -3947,7 +3947,7 @@ jobs:
run: |
git commit --all --amend --no-edit || true
git push --force-with-lease
echo "::set-output name=sha::$(git rev-parse HEAD)"
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Get Workflow Job
uses: actions/github-script@v6
if: steps.commit.outputs.sha
Expand Down Expand Up @@ -4028,7 +4028,7 @@ jobs:
else
result="success"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: needs.update.outputs.check-id && always()
Expand Down Expand Up @@ -4143,7 +4143,7 @@ jobs:
else
result="white_check_mark"
fi
echo "::set-output name=result::$result"
echo "result=$result" >> $GITHUB_OUTPUT
- name: Update Release PR Comment
uses: actions/github-script@v6
env:
Expand Down

0 comments on commit dc73ffe

Please sign in to comment.