Skip to content

Commit

Permalink
ci: Use GITHUB_OUTPUT envvar instead of set-output command
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
arunsathiya authored Jan 18, 2024
1 parent 2d060fe commit db4ab1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/qns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
echo "Servers: $SERVERS"
MATRIX=$(echo "[$CLIENTS, $SERVERS]" | jq -c '{"include": . | flatten | sort | unique}')
echo "Matrix: $MATRIX"
echo "::set-output name=matrix::$MATRIX"
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
s2n-quic-qns:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
wget ${INTEROP_BASE_URL}latest/result.json || echo '{}' > result.json
mv result.json latest.json
INTEROP_LOG_URL=${INTEROP_BASE_URL}$(jq --raw-output '.log_dir' latest.json)/SERVER_CLIENT/TEST/
echo "::set-output name=INTEROP_LOG_URL::$INTEROP_LOG_URL"
echo "INTEROP_LOG_URL=$INTEROP_LOG_URL" >> $GITHUB_OUTPUT
- name: Get latest successful interop commit SHA on main branch
id: mainsha
Expand All @@ -268,7 +268,7 @@ jobs:
--header "Accept: application/vnd.github.v3+json" > latest_workflow_run.json
MAIN_SHA=$(jq --raw-output '.workflow_runs[0] | .head_sha' latest_workflow_run.json)
rm -f latest_workflow_run.json
echo "::set-output name=MAIN_SHA::$MAIN_SHA"
echo "MAIN_SHA=$MAIN_SHA" >> $GITHUB_OUTPUT
- name: Download latest main interop result
if: github.event.pull_request
Expand Down Expand Up @@ -322,7 +322,7 @@ jobs:
TARGET="${{ github.sha }}/interop"
aws s3 sync web "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
URL="$CDN/$TARGET/index.html"
echo "::set-output name=URL::$URL"
echo "URL=$URL" >> $GITHUB_OUTPUT
- uses: ouzi-dev/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
Expand Down Expand Up @@ -423,7 +423,7 @@ jobs:
TARGET="${{ github.sha }}/bench"
aws s3 sync target/benchmark/results "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
URL="$CDN/$TARGET/index.html"
echo "::set-output name=URL::$URL"
echo "URL=$URL" >> $GITHUB_OUTPUT
- uses: ouzi-dev/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
Expand Down Expand Up @@ -572,7 +572,7 @@ jobs:
TARGET="${{ github.sha }}/perf"
aws s3 sync perf-results "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
URL="$CDN/$TARGET/index.html"
echo "::set-output name=URL::$URL"
echo "URL=$URL" >> $GITHUB_OUTPUT
- uses: ouzi-dev/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
fi
echo "::set-output name=tags::${TAGS}"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Login to Amazon Elastic Container Registry Public
uses: docker/[email protected]
Expand Down

0 comments on commit db4ab1f

Please sign in to comment.