Skip to content

Commit 7b710b4

Browse files
committed
Stop using deprecated set-output command in workflows
DEV-1359 GitHub actions has deprecated set-output and save-state commands. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
1 parent bdad378 commit 7b710b4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/tag-and-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
fetch-depth: 0
5050
- name: Get tag 🏷
5151
id: commit-tag
52-
run: echo ::set-output name=value::$(git describe --tags --abbrev=0)
52+
run: echo "value=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
5353
- name: Generate release notes 📝
5454
run: git log --pretty="%h %s" $(git describe --tags --abbrev=0)...$(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^) > changelog.txt
5555
- name: Publish release 🚀

.github/workflows/upstream-sync.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ jobs:
2121
upstream_sha=$(gh api \
2222
-H "Accept: application/vnd.github.v3+json" \
2323
"/repos/${{env.UPSTREAM_OWNER}}/$(basename $(pwd))/commits/stable/${{inputs.release_series}}" --jq ".sha")
24-
echo "::set-output name=result::$upstream_sha"
24+
echo "result=$upstream_sha" >> $GITHUB_OUTPUT
2525
- name: Check if downstream branch exists
2626
id: check_if_downstream_branch_exists
2727
run: |
2828
api_path="/repos/${{env.DOWNSTREAM_OWNER}}/$(basename $(pwd))/branches/stackhpc/${{inputs.release_series}}"
2929
response=$(gh api -H "Accept: application/vnd.github.v3+json" $api_path --silent --include) || true
3030
if [[ "$response" =~ "HTTP/2.0 200 OK" ]]; then
31-
echo "::set-output name=result::true"
31+
echo "result=true" >> $GITHUB_OUTPUT
3232
elif [[ "$response" =~ "HTTP/2.0 404 Not Found" ]]; then
33-
echo "::set-output name=result::false"
33+
echo "result=false" >> $GITHUB_OUTPUT
3434
else
3535
exit 1
3636
fi
@@ -52,7 +52,7 @@ jobs:
5252
"/repos/${{env.DOWNSTREAM_OWNER}}/$(basename $(pwd))"\
5353
"/compare/stackhpc/${{inputs.release_series}}..."\
5454
"${{env.UPSTREAM_OWNER}}:stable/${{inputs.release_series}}" --jq '.ahead_by')
55-
echo "::set-output name=result::$ahead_by"
55+
echo "result=$ahead_by" >> $GITHUB_OUTPUT
5656
- name: Create copy of the upstream branch
5757
if: steps.check_if_ahead.outputs.result > 0
5858
run: |
@@ -74,7 +74,7 @@ jobs:
7474
-f body="This PR contains a snapshot of ${{inputs.release_series}} from upstream." \
7575
-f head="${{env.DOWNSTREAM_OWNER}}:upstream/${{inputs.release_series}}-$(date +%F)" \
7676
-f base="stackhpc/${{inputs.release_series}}" --jq '.url')
77-
echo "::set-output name=result::$(basename $pull_request_url)"
77+
echo "result=$(basename $pull_request_url)" >> $GITHUB_OUTPUT
7878
- name: Add labels to pull request
7979
if: steps.check_if_ahead.outputs.result > 0
8080
run: |

0 commit comments

Comments
 (0)