Skip to content

Commit 5f9f09c

Browse files
authored
ci: Use GITHUB_OUTPUT envvar instead of set-output command (#2098)
`save-state` and `set-output` commands used in GitHub Actions are deprecated and [GitHub recommends using environment files](https://github.blog/changelog/2023-07-24-github-actions-update-on-save-state-and-set-output-commands/). This PR updates the usage of `set-output` to `$GITHUB_OUTPUT` Instructions for envvar usage from GitHub docs: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
1 parent 958698d commit 5f9f09c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/qns.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
echo "Servers: $SERVERS"
6767
MATRIX=$(echo "[$CLIENTS, $SERVERS]" | jq -c '{"include": . | flatten | sort | unique}')
6868
echo "Matrix: $MATRIX"
69-
echo "::set-output name=matrix::$MATRIX"
69+
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
7070
7171
s2n-quic-qns:
7272
runs-on: ubuntu-22.04
@@ -257,7 +257,7 @@ jobs:
257257
wget ${INTEROP_BASE_URL}latest/result.json || echo '{}' > result.json
258258
mv result.json latest.json
259259
INTEROP_LOG_URL=${INTEROP_BASE_URL}$(jq --raw-output '.log_dir' latest.json)/SERVER_CLIENT/TEST/
260-
echo "::set-output name=INTEROP_LOG_URL::$INTEROP_LOG_URL"
260+
echo "INTEROP_LOG_URL=$INTEROP_LOG_URL" >> $GITHUB_OUTPUT
261261
262262
- name: Get latest successful interop commit SHA on main branch
263263
id: mainsha
@@ -268,7 +268,7 @@ jobs:
268268
--header "Accept: application/vnd.github.v3+json" > latest_workflow_run.json
269269
MAIN_SHA=$(jq --raw-output '.workflow_runs[0] | .head_sha' latest_workflow_run.json)
270270
rm -f latest_workflow_run.json
271-
echo "::set-output name=MAIN_SHA::$MAIN_SHA"
271+
echo "MAIN_SHA=$MAIN_SHA" >> $GITHUB_OUTPUT
272272
273273
- name: Download latest main interop result
274274
if: github.event.pull_request
@@ -322,7 +322,7 @@ jobs:
322322
TARGET="${{ github.sha }}/interop"
323323
aws s3 sync web "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
324324
URL="$CDN/$TARGET/index.html"
325-
echo "::set-output name=URL::$URL"
325+
echo "URL=$URL" >> $GITHUB_OUTPUT
326326
327327
- uses: ouzi-dev/commit-status-updater@v2.0.1
328328
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
@@ -423,7 +423,7 @@ jobs:
423423
TARGET="${{ github.sha }}/bench"
424424
aws s3 sync target/benchmark/results "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
425425
URL="$CDN/$TARGET/index.html"
426-
echo "::set-output name=URL::$URL"
426+
echo "URL=$URL" >> $GITHUB_OUTPUT
427427
428428
- uses: ouzi-dev/commit-status-updater@v2.0.1
429429
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
@@ -572,7 +572,7 @@ jobs:
572572
TARGET="${{ github.sha }}/perf"
573573
aws s3 sync perf-results "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
574574
URL="$CDN/$TARGET/index.html"
575-
echo "::set-output name=URL::$URL"
575+
echo "URL=$URL" >> $GITHUB_OUTPUT
576576
577577
- uses: ouzi-dev/commit-status-updater@v2.0.1
578578
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
3939
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
4040
fi
41-
echo "::set-output name=tags::${TAGS}"
41+
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
4242
4343
- name: Login to Amazon Elastic Container Registry Public
4444
uses: docker/login-action@v3.0.0

0 commit comments

Comments
 (0)