chore(actions): use newer method to set an output parameter (#6039)

* chore(actions): use newer method to set an output parameter

The set-output command is deprecated and will be disabled soon.
For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

* fix(actions): wrong substitution
This commit is contained in:
Gustavo Valverde 2023-01-31 16:40:05 -04:00 committed by GitHub
parent d82b36615f
commit 333b5eadd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -53,7 +53,7 @@ jobs:
) | jq -c .)
echo $MATRIX
echo $MATRIX | jq .
echo "::set-output name=matrix::$MATRIX"
echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
check-matrix:
runs-on: ubuntu-latest

View File

@ -80,7 +80,7 @@ jobs:
) | jq -c .)
echo $MATRIX
echo $MATRIX | jq .
echo "::set-output name=matrix::$MATRIX"
echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
check-matrix:
runs-on: ubuntu-latest

View File

@ -57,7 +57,7 @@ jobs:
return context.payload.release.tag_name.substring(0,2)
- name: Setting API Version
id: set
run: echo "::set-output name=major_version::${{ steps.get.outputs.result }}"
run: echo "major_version=${{ steps.get.outputs.result }}" >> "$GITHUB_OUTPUT"
# Each time this workflow is executed, a build will be triggered to create a new image
# with the corresponding tags using information from Git

View File

@ -139,28 +139,28 @@ jobs:
LWD_TIP_DISK=$(gcloud compute images list --filter="status=READY AND name~lwd-cache-.+-[0-9a-f]+-v${LOCAL_STATE_VERSION}-${NETWORK}-tip" --format="value(NAME)" --sort-by=~creationTimestamp --limit=1)
if [[ -z "$LWD_TIP_DISK" ]]; then
echo "No TIP disk found for LWD"
echo "::set-output name=lwd_tip_disk::${{ toJSON(false) }}"
echo "lwd_tip_disk=${{ toJSON(false) }}" >> "$GITHUB_OUTPUT"
else
echo "Disk: $LWD_TIP_DISK"
echo "::set-output name=lwd_tip_disk::${{ toJSON(true) }}"
echo "lwd_tip_disk=${{ toJSON(true) }}" >> "$GITHUB_OUTPUT"
fi
ZEBRA_TIP_DISK=$(gcloud compute images list --filter="status=READY AND name~zebrad-cache-.+-[0-9a-f]+-v${LOCAL_STATE_VERSION}-${NETWORK}-tip" --format="value(NAME)" --sort-by=~creationTimestamp --limit=1)
if [[ -z "$ZEBRA_TIP_DISK" ]]; then
echo "No TIP disk found for ZEBRA"
echo "::set-output name=zebra_tip_disk::${{ toJSON(false) }}"
echo "zebra_tip_disk=${{ toJSON(false) }}" >> "$GITHUB_OUTPUT"
else
echo "Disk: $ZEBRA_TIP_DISK"
echo "::set-output name=zebra_tip_disk::${{ toJSON(true) }}"
echo "zebra_tip_disk=${{ toJSON(true) }}" >> "$GITHUB_OUTPUT"
fi
ZEBRA_CHECKPOINT_DISK=$(gcloud compute images list --filter="status=READY AND name~zebrad-cache-.+-[0-9a-f]+-v${LOCAL_STATE_VERSION}-${NETWORK}-checkpoint" --format="value(NAME)" --sort-by=~creationTimestamp --limit=1)
if [[ -z "$ZEBRA_CHECKPOINT_DISK" ]]; then
echo "No CHECKPOINT found for ZEBRA"
echo "::set-output name=zebra_checkpoint_disk::${{ toJSON(false) }}"
echo "zebra_checkpoint_disk=${{ toJSON(false) }}" >> "$GITHUB_OUTPUT"
else
echo "Disk: $ZEBRA_CHECKPOINT_DISK"
echo "::set-output name=zebra_checkpoint_disk::${{ toJSON(true) }}"
echo "zebra_checkpoint_disk=${{ toJSON(true) }}" >> "$GITHUB_OUTPUT"
fi
build:

View File

@ -394,7 +394,7 @@ jobs:
fi
echo "Selected Disk: $CACHED_DISK_NAME"
echo "::set-output name=cached_disk_name::$CACHED_DISK_NAME"
echo "cached_disk_name=$CACHED_DISK_NAME" >> "$GITHUB_OUTPUT"
echo "STATE_VERSION=$LOCAL_STATE_VERSION" >> "$GITHUB_ENV"
echo "CACHED_DISK_NAME=$CACHED_DISK_NAME" >> "$GITHUB_ENV"