From 4020e7840ac4891a2813fcf4667ddef89a7778e5 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Fri, 14 Apr 2023 18:25:53 +0200 Subject: [PATCH] ci: always use tee -a instead of redirecting into GITHUB_OUTPUT Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- .../constellation_iam_create/action.yml | 2 +- .github/actions/e2e_autoscaling/action.yml | 6 +- .github/actions/e2e_test/action.yml | 4 +- .github/actions/os_build_variables/action.yml | 106 +++++++++--------- .github/actions/pseudo_version/action.yml | 10 +- .github/actions/select_image/action.yml | 11 +- .github/actions/versionsapi/action.yml | 3 +- .github/workflows/build-gcp-guest-agent.yml | 8 +- .../workflows/build-os-image-scheduled.yml | 6 +- .github/workflows/build-os-image.yml | 22 ++-- .github/workflows/e2e-test-manual.yml | 9 +- .github/workflows/e2e-test-release.yml | 2 +- .github/workflows/purge-main.yml | 8 +- .github/workflows/test-tidy.yml | 4 +- .github/workflows/versionsapi.yml | 12 +- 15 files changed, 104 insertions(+), 109 deletions(-) diff --git a/.github/actions/constellation_iam_create/action.yml b/.github/actions/constellation_iam_create/action.yml index 4d1d5bdf1..9c4416ccc 100644 --- a/.github/actions/constellation_iam_create/action.yml +++ b/.github/actions/constellation_iam_create/action.yml @@ -71,4 +71,4 @@ runs: id: setExistingConfig shell: bash run: | - echo "existingConfig=true" >> $GITHUB_OUTPUT + echo "existingConfig=true" | tee -a $GITHUB_OUTPUT diff --git a/.github/actions/e2e_autoscaling/action.yml b/.github/actions/e2e_autoscaling/action.yml index b1182105e..968a2fc0a 100644 --- a/.github/actions/e2e_autoscaling/action.yml +++ b/.github/actions/e2e_autoscaling/action.yml @@ -18,7 +18,7 @@ runs: KUBECONFIG: ${{ inputs.kubeconfig }} run: | worker_count=$(kubectl get nodes -o json --selector='!node-role.kubernetes.io/control-plane' | jq '.items | length') - echo "worker_count=${worker_count}" >> $GITHUB_OUTPUT + echo "worker_count=${worker_count}" | tee -a "$GITHUB_OUTPUT" echo "The cluster currently has ${worker_count} nodes." # The following step identifies the name of the worker scaling group. As the scaling group is @@ -43,7 +43,7 @@ runs: exit 1 fi worker_group=$(kubectl get scalinggroups -o json | jq -r '.items[].metadata.name | select(contains("worker"))') - echo "worker_name=${worker_group}" >> $GITHUB_OUTPUT + echo "worker_name=${worker_group}" | tee -a "$GITHUB_OUTPUT" echo "The name of your worker scaling group is '${worker_group}'." - name: Patch autoscaling to true @@ -64,7 +64,7 @@ runs: worker_group=${{ steps.worker_name.outputs.worker_name }} worker_count=${{ steps.worker_count.outputs.worker_count }} worker_target=$((worker_count + 2)) - echo "worker_target=${worker_target}" >> $GITHUB_OUTPUT + echo "worker_target=${worker_target}" | tee -a "$GITHUB_OUTPUT" kubectl patch scalinggroups ${worker_group} --patch '{"spec":{"max": '${worker_target}'}}' --type='merge' kubectl get scalinggroup ${worker_group} -o jsonpath='{.spec}' | jq diff --git a/.github/actions/e2e_test/action.yml b/.github/actions/e2e_test/action.yml index b57f9af25..1f7ff4b0b 100644 --- a/.github/actions/e2e_test/action.yml +++ b/.github/actions/e2e_test/action.yml @@ -98,8 +98,8 @@ runs: id: determine-build-target shell: bash run: | - echo "hostOS=$(go env GOOS)" >> $GITHUB_OUTPUT - echo "hostArch=$(go env GOARCH)" >> $GITHUB_OUTPUT + echo "hostOS=$(go env GOOS)" | tee -a "$GITHUB_OUTPUT" + echo "hostArch=$(go env GOARCH)" | tee -a "$GITHUB_OUTPUT" - name: Setup bazel uses: ./.github/actions/setup_bazel diff --git a/.github/actions/os_build_variables/action.yml b/.github/actions/os_build_variables/action.yml index 5977bcb18..60dd0e867 100644 --- a/.github/actions/os_build_variables/action.yml +++ b/.github/actions/os_build_variables/action.yml @@ -174,20 +174,20 @@ runs: timestamp: ${{ steps.version.outputs.timestamp }} semver: ${{ steps.version.outputs.semanticVersion }} run: | - echo "region=eu-central-1" >> $GITHUB_OUTPUT - echo "replicationRegions=us-east-2 ap-south-1" >> $GITHUB_OUTPUT - echo "bucket=constellation-images" >> $GITHUB_OUTPUT - echo "efivarsPath=${basePath}/mkosi.output.aws/fedora~37/efivars.bin" >> $GITHUB_OUTPUT - echo "imagePath=${basePath}/mkosi.output.aws/fedora~37/image.raw" >> $GITHUB_OUTPUT - echo "jsonOutput=${basePath}/mkosi.output.aws/fedora~37/image-upload.json" >> $GITHUB_OUTPUT - echo "imageFilename=image-$(date +%s).raw" >> $GITHUB_OUTPUT + echo "region=eu-central-1" | tee -a "$GITHUB_OUTPUT" + echo "replicationRegions=us-east-2 ap-south-1" | tee -a "$GITHUB_OUTPUT" + echo "bucket=constellation-images" | tee -a "$GITHUB_OUTPUT" + echo "efivarsPath=${basePath}/mkosi.output.aws/fedora~37/efivars.bin" | tee -a "$GITHUB_OUTPUT" + echo "imagePath=${basePath}/mkosi.output.aws/fedora~37/image.raw" | tee -a "$GITHUB_OUTPUT" + echo "jsonOutput=${basePath}/mkosi.output.aws/fedora~37/image-upload.json" | tee -a "$GITHUB_OUTPUT" + echo "imageFilename=image-$(date +%s).raw" | tee -a "$GITHUB_OUTPUT" if [[ "${stream}" = "stable" ]] then - echo "imageName=constellation-${imageVersion}" >> $GITHUB_OUTPUT - echo "publish=true" >> $GITHUB_OUTPUT + echo "imageName=constellation-${imageVersion}" | tee -a "$GITHUB_OUTPUT" + echo "publish=true" | tee -a "$GITHUB_OUTPUT" else - echo "imageName=constellation-${ref}-${stream}-${semver}-${timestamp}" >> $GITHUB_OUTPUT - echo "publish=false" >> $GITHUB_OUTPUT + echo "imageName=constellation-${ref}-${stream}-${semver}-${timestamp}" | tee -a "$GITHUB_OUTPUT" + echo "publish=false" | tee -a "$GITHUB_OUTPUT" fi # gallery name may include alphanumeric characters, dots and underscores. Must end and begin with an alphanumeric character @@ -207,47 +207,47 @@ runs: semver: ${{ steps.version.outputs.semanticVersion }} uploadVariant: ${{ inputs.uploadVariant }} run: | - echo "resourceGroupName=constellation-images" >> $GITHUB_OUTPUT - echo "region=northeurope" >> $GITHUB_OUTPUT - echo "vmgsRegion=eu-central-1" >> $GITHUB_OUTPUT - echo "replicationRegions=northeurope eastus westeurope westus" >> $GITHUB_OUTPUT - echo "sku=constellation" >> $GITHUB_OUTPUT - echo "publisher=edgelesssys" >> $GITHUB_OUTPUT - echo "rawImagePath=${basePath}/mkosi.output.azure/fedora~37/image.raw" >> $GITHUB_OUTPUT - echo "imagePath=${basePath}/mkosi.output.azure/fedora~37/image.vhd" >> $GITHUB_OUTPUT - echo "jsonOutput=${basePath}/mkosi.output.azure/fedora~37/image-upload${uploadVariant}.json" >> $GITHUB_OUTPUT + echo "resourceGroupName=constellation-images" | tee -a "$GITHUB_OUTPUT" + echo "region=northeurope" | tee -a "$GITHUB_OUTPUT" + echo "vmgsRegion=eu-central-1" | tee -a "$GITHUB_OUTPUT" + echo "replicationRegions=northeurope eastus westeurope westus" | tee -a "$GITHUB_OUTPUT" + echo "sku=constellation" | tee -a "$GITHUB_OUTPUT" + echo "publisher=edgelesssys" | tee -a "$GITHUB_OUTPUT" + echo "rawImagePath=${basePath}/mkosi.output.azure/fedora~37/image.raw" | tee -a "$GITHUB_OUTPUT" + echo "imagePath=${basePath}/mkosi.output.azure/fedora~37/image.vhd" | tee -a "$GITHUB_OUTPUT" + echo "jsonOutput=${basePath}/mkosi.output.azure/fedora~37/image-upload${uploadVariant}.json" | tee -a "$GITHUB_OUTPUT" # TODO: set default security type to "ConfidentialVM" once replication is possible securityType=${{ inputs.uploadVariant }} if [[ -z "${securityType}" ]]; then securityType=ConfidentialVMSupported fi - echo "securityType=${securityType}" >> $GITHUB_OUTPUT - echo "diskName=constellation-${stream}-${timestamp}-${securityType,,}" >> $GITHUB_OUTPUT + echo "securityType=${securityType}" | tee -a "$GITHUB_OUTPUT" + echo "diskName=constellation-${stream}-${timestamp}-${securityType,,}" | tee -a "$GITHUB_OUTPUT" if [[ "${stream}" = "stable" ]] then - echo "imageDefinition=constellation" >> $GITHUB_OUTPUT - echo "imageOffer=constellation" >> $GITHUB_OUTPUT - echo "imageVersion=${imageVersion:1}" >> $GITHUB_OUTPUT + echo "imageDefinition=constellation" | tee -a "$GITHUB_OUTPUT" + echo "imageOffer=constellation" | tee -a "$GITHUB_OUTPUT" + echo "imageVersion=${imageVersion:1}" | tee -a "$GITHUB_OUTPUT" galleryName=Constellation elif [[ "${imageType}" = "debug" && ( "${ref}" = "-" || "${ref}" = "main" ) ]] then - echo "imageDefinition=${semver}" >> $GITHUB_OUTPUT - echo "imageOffer=${semver}" >> $GITHUB_OUTPUT - echo "imageVersion=${timestamp:0:4}.${timestamp:4:4}.${timestamp:8}" >> $GITHUB_OUTPUT + echo "imageDefinition=${semver}" | tee -a "$GITHUB_OUTPUT" + echo "imageOffer=${semver}" | tee -a "$GITHUB_OUTPUT" + echo "imageVersion=${timestamp:0:4}.${timestamp:4:4}.${timestamp:8}" | tee -a "$GITHUB_OUTPUT" galleryName=Constellation_Debug else - echo "imageDefinition=${ref}-${stream}" >> $GITHUB_OUTPUT - echo "imageOffer=${ref}-${stream}" >> $GITHUB_OUTPUT - echo "imageVersion=${timestamp:0:4}.${timestamp:4:4}.${timestamp:8}" >> $GITHUB_OUTPUT + echo "imageDefinition=${ref}-${stream}" | tee -a "$GITHUB_OUTPUT" + echo "imageOffer=${ref}-${stream}" | tee -a "$GITHUB_OUTPUT" + echo "imageVersion=${timestamp:0:4}.${timestamp:4:4}.${timestamp:8}" | tee -a "$GITHUB_OUTPUT" galleryName=Constellation_Testing fi # TODO: enable VMGS upload for ConfidentialVM images once replication is possible if [[ "${securityType}" == "ConfidentialVMSupported" ]]; then - echo "galleryName=${galleryName}_CVM" >> $GITHUB_OUTPUT - echo "vmgsPath=" >> $GITHUB_OUTPUT + echo "galleryName=${galleryName}_CVM" | tee -a "$GITHUB_OUTPUT" + echo "vmgsPath=" | tee -a "$GITHUB_OUTPUT" else - echo "galleryName=${galleryName}" >> $GITHUB_OUTPUT - echo "vmgsPath=${basePath}/pki/${securityType}.vmgs" >> $GITHUB_OUTPUT + echo "galleryName=${galleryName}" | tee -a "$GITHUB_OUTPUT" + echo "vmgsPath=${basePath}/pki/${securityType}.vmgs" | tee -a "$GITHUB_OUTPUT" fi # image family and image name may include lowercase alphanumeric characters and dashes. @@ -264,19 +264,19 @@ runs: imageType: ${{ inputs.imageType }} timestamp: ${{ steps.version.outputs.timestamp }} run: | - echo "project=constellation-images" >> $GITHUB_OUTPUT - echo "bucket=constellation-images" >> $GITHUB_OUTPUT - echo "region=europe-west3" >> $GITHUB_OUTPUT - echo "rawImagePath=${basePath}/mkosi.output.gcp/fedora~37/image.raw" >> $GITHUB_OUTPUT - echo "imagePath=${basePath}/mkosi.output.gcp/fedora~37/image.tar.gz" >> $GITHUB_OUTPUT - echo "jsonOutput=${basePath}/mkosi.output.gcp/fedora~37/image-upload.json" >> $GITHUB_OUTPUT - echo "imageName=${imageVersion//./-}-${stream}" >> $GITHUB_OUTPUT - echo "imageFilename=${imageVersion//./-}-${stream}.tar.gz" >> $GITHUB_OUTPUT + echo "project=constellation-images" | tee -a "$GITHUB_OUTPUT" + echo "bucket=constellation-images" | tee -a "$GITHUB_OUTPUT" + echo "region=europe-west3" | tee -a "$GITHUB_OUTPUT" + echo "rawImagePath=${basePath}/mkosi.output.gcp/fedora~37/image.raw" | tee -a "$GITHUB_OUTPUT" + echo "imagePath=${basePath}/mkosi.output.gcp/fedora~37/image.tar.gz" | tee -a "$GITHUB_OUTPUT" + echo "jsonOutput=${basePath}/mkosi.output.gcp/fedora~37/image-upload.json" | tee -a "$GITHUB_OUTPUT" + echo "imageName=${imageVersion//./-}-${stream}" | tee -a "$GITHUB_OUTPUT" + echo "imageFilename=${imageVersion//./-}-${stream}.tar.gz" | tee -a "$GITHUB_OUTPUT" if [[ "${stream}" = "stable" ]] then - echo "imageFamily=constellation" >> $GITHUB_OUTPUT + echo "imageFamily=constellation" | tee -a "$GITHUB_OUTPUT" else - echo "imageFamily=constellation-${ref::45}" >> $GITHUB_OUTPUT + echo "imageFamily=constellation-${ref::45}" | tee -a "$GITHUB_OUTPUT" fi - name: Configure OpenStack input variables @@ -286,10 +286,10 @@ runs: env: basePath: ${{ inputs.basePath }} run: | - echo "bucket=cdn-constellation-backend" >> $GITHUB_OUTPUT - echo "baseUrl=https://cdn.confidential.cloud" >> $GITHUB_OUTPUT - echo "imagePath=${basePath}/mkosi.output.openstack/fedora~37/image.raw" >> $GITHUB_OUTPUT - echo "jsonOutput=${basePath}/mkosi.output.openstack/fedora~37/image-upload.json" >> $GITHUB_OUTPUT + echo "bucket=cdn-constellation-backend" | tee -a "$GITHUB_OUTPUT" + echo "baseUrl=https://cdn.confidential.cloud" | tee -a "$GITHUB_OUTPUT" + echo "imagePath=${basePath}/mkosi.output.openstack/fedora~37/image.raw" | tee -a "$GITHUB_OUTPUT" + echo "jsonOutput=${basePath}/mkosi.output.openstack/fedora~37/image-upload.json" | tee -a "$GITHUB_OUTPUT" - name: Configure QEMU input variables id: qemu @@ -298,7 +298,7 @@ runs: env: basePath: ${{ inputs.basePath }} run: | - echo "bucket=cdn-constellation-backend" >> $GITHUB_OUTPUT - echo "baseUrl=https://cdn.confidential.cloud" >> $GITHUB_OUTPUT - echo "imagePath=${basePath}/mkosi.output.qemu/fedora~37/image.raw" >> $GITHUB_OUTPUT - echo "jsonOutput=${basePath}/mkosi.output.qemu/fedora~37/image-upload.json" >> $GITHUB_OUTPUT + echo "bucket=cdn-constellation-backend" | tee -a "$GITHUB_OUTPUT" + echo "baseUrl=https://cdn.confidential.cloud" | tee -a "$GITHUB_OUTPUT" + echo "imagePath=${basePath}/mkosi.output.qemu/fedora~37/image.raw" | tee -a "$GITHUB_OUTPUT" + echo "jsonOutput=${basePath}/mkosi.output.qemu/fedora~37/image-upload.json" | tee -a "$GITHUB_OUTPUT" diff --git a/.github/actions/pseudo_version/action.yml b/.github/actions/pseudo_version/action.yml index 947b00c1a..a95bb97e1 100644 --- a/.github/actions/pseudo_version/action.yml +++ b/.github/actions/pseudo_version/action.yml @@ -28,13 +28,13 @@ runs: export GOCACHE=${homedir}/.cache/go-build export GOPATH=${homedir}/go export GOMODCACHE=${homedir}/.cache/go-mod - + version=$(go run .) semanticVersion=$(go run . -semantic-version) timestamp=$(go run . -print-timestamp) branchName=$(go run . -print-branch) - echo "version=${version}" >> $GITHUB_OUTPUT - echo "semanticVersion=${semanticVersion}" >> $GITHUB_OUTPUT - echo "timestamp=${timestamp}" >> $GITHUB_OUTPUT - echo "branchName=${branchName}" >> $GITHUB_OUTPUT + echo "version=${version}" | tee -a "$GITHUB_OUTPUT" + echo "semanticVersion=${semanticVersion}" | tee -a "$GITHUB_OUTPUT" + echo "timestamp=${timestamp}" | tee -a "$GITHUB_OUTPUT" + echo "branchName=${branchName}" | tee -a "$GITHUB_OUTPUT" diff --git a/.github/actions/select_image/action.yml b/.github/actions/select_image/action.yml index 149816fc0..b87107607 100644 --- a/.github/actions/select_image/action.yml +++ b/.github/actions/select_image/action.yml @@ -28,9 +28,9 @@ runs: shell: bash run: | if [[ "${{ inputs.osImage }}" == "ref/main/stream/debug/?" || "${{ inputs.osImage }}" == "ref/release/stream/stable/?" ]]; then - echo "result=true" >> "$GITHUB_OUTPUT" + echo "result=true" | tee -a "$GITHUB_OUTPUT" else - echo "result=false" >> "$GITHUB_OUTPUT" + echo "result=false" | tee -a "$GITHUB_OUTPUT" fi - name: Separate ref and stream from matrix @@ -43,7 +43,6 @@ runs: echo "ref=$(echo $REFSTREAM | cut -d/ -f2)" | tee -a "$GITHUB_OUTPUT" echo "stream=$(echo $REFSTREAM | cut -d/ -f4)" | tee -a "$GITHUB_OUTPUT" - - name: Find latest image if: steps.input-is-preset.outputs.result == 'true' id: find-latest-image @@ -64,16 +63,16 @@ runs: export IMAGE=${{ inputs.osImage }} fi - echo "osImage=$IMAGE" >> $GITHUB_OUTPUT + echo "osImage=$IMAGE" | tee -a "$GITHUB_OUTPUT" echo "Using image: $IMAGE" case "$IMAGE" in *"/stream/debug/"*) - echo "isDebugImage=true" >> "$GITHUB_OUTPUT" + echo "isDebugImage=true" | tee -a "$GITHUB_OUTPUT" echo "Image is debug image." ;; *) - echo "isDebugImage=false" >> "$GITHUB_OUTPUT" + echo "isDebugImage=false" | tee -a "$GITHUB_OUTPUT" echo "Image is not debug image." ;; esac diff --git a/.github/actions/versionsapi/action.yml b/.github/actions/versionsapi/action.yml index 62771e163..fac38adcb 100644 --- a/.github/actions/versionsapi/action.yml +++ b/.github/actions/versionsapi/action.yml @@ -85,5 +85,4 @@ runs: exit 0 fi - echo "output=${out}" >> "$GITHUB_OUTPUT" - echo "${out}" + echo "output=${out}" | tee -a "$GITHUB_OUTPUT" diff --git a/.github/workflows/build-gcp-guest-agent.yml b/.github/workflows/build-gcp-guest-agent.yml index 847663aac..dd8cc376e 100644 --- a/.github/workflows/build-gcp-guest-agent.yml +++ b/.github/workflows/build-gcp-guest-agent.yml @@ -21,7 +21,7 @@ jobs: run: | latest=$(curl -fsSL https://api.github.com/repos/GoogleCloudPlatform/guest-agent/releases/latest | jq -r .tag_name) echo "Latest version of guest-agent is $latest" - echo "latest=$latest" >> "$GITHUB_OUTPUT" + echo "latest=$latest" | tee -a "$GITHUB_OUTPUT" - name: Make tag a valid semver id: latest-release-semver @@ -32,7 +32,7 @@ jobs: afterDotEvaluated=$((afterDot)) semver="$beforeDot.$afterDotEvaluated" echo "Semver tag of guest-agent is $semver" - echo "latest=$semver" >> "$GITHUB_OUTPUT" + echo "latest=$semver" | tee -a "$GITHUB_OUTPUT" - name: Check if the tag is newer than our last build id: needs-build @@ -61,11 +61,11 @@ jobs: if [[ $rebuild == false ]]; then echo "Latest tag $latestTag is already built, exiting" - echo "out=false" >> "$GITHUB_OUTPUT" + echo "out=false" | tee -a "$GITHUB_OUTPUT" exit 0 fi echo "Latest tag $latestTag is older than ${semverUpstream}, building" - echo "out=true" >> "$GITHUB_OUTPUT" + echo "out=true" | tee -a "$GITHUB_OUTPUT" - name: Checkout GoogleCloudPlatform/guest-agent if: steps.needs-build.outputs.out == 'true' diff --git a/.github/workflows/build-os-image-scheduled.yml b/.github/workflows/build-os-image-scheduled.yml index 48c4a4858..01f927360 100644 --- a/.github/workflows/build-os-image-scheduled.yml +++ b/.github/workflows/build-os-image-scheduled.yml @@ -17,13 +17,13 @@ jobs: run: | case "${{ github.event.schedule }}" in "0 21 * * 5") - echo "stream=debug" >> "$GITHUB_OUTPUT" + echo "stream=debug" | tee -a "$GITHUB_OUTPUT" ;; "10 21 * * 5") - echo "stream=console" >> "$GITHUB_OUTPUT" + echo "stream=console" | tee -a "$GITHUB_OUTPUT" ;; "20 21 * * 5") - echo "stream=nightly" >> "$GITHUB_OUTPUT" + echo "stream=nightly" | tee -a "$GITHUB_OUTPUT" ;; *) echo "::error::Unknown stream for schedule '${{ github.event.schedule }}'" diff --git a/.github/workflows/build-os-image.yml b/.github/workflows/build-os-image.yml index ec28e7ba0..dc5c608fb 100644 --- a/.github/workflows/build-os-image.yml +++ b/.github/workflows/build-os-image.yml @@ -150,9 +150,9 @@ jobs: id: ref run: | if [[ "${{ inputs.isRelease }}" = "true" ]]; then - echo "ref=-" >> "$GITHUB_OUTPUT" + echo "ref=-" | tee -a "$GITHUB_OUTPUT" else - echo "ref=${{ steps.version.outputs.branchName }}" >> "$GITHUB_OUTPUT" + echo "ref=${{ steps.version.outputs.branchName }}" | tee -a "$GITHUB_OUTPUT" fi - name: Determine and validate stream @@ -167,7 +167,7 @@ jobs: exit 1 fi - echo "stream=${{ inputs.stream }}" >> "$GITHUB_OUTPUT" + echo "stream=${{ inputs.stream }}" | tee -a "$GITHUB_OUTPUT" - name: Determine type of image build shell: bash @@ -175,13 +175,13 @@ jobs: run: | case "${{ steps.stream.outputs.stream }}" in "debug") - echo "imageType=debug" >> "$GITHUB_OUTPUT" + echo "imageType=debug" | tee -a "$GITHUB_OUTPUT" ;; "console") - echo "imageType=console" >> "$GITHUB_OUTPUT" + echo "imageType=console" | tee -a "$GITHUB_OUTPUT" ;; *) - echo "imageType=default" >> "$GITHUB_OUTPUT" + echo "imageType=default" | tee -a "$GITHUB_OUTPUT" ;; esac @@ -190,9 +190,9 @@ jobs: shell: bash run: | if [[ "${{ inputs.isRelease }}" == "true" ]] && [[ "${{ steps.stream.outputs.stream }}" == "stable" ]]; then - echo "pkiSet=pki_prod" >> "$GITHUB_OUTPUT" + echo "pkiSet=pki_prod" | tee -a "$GITHUB_OUTPUT" else - echo "pkiSet=pki_testing" >> "$GITHUB_OUTPUT" + echo "pkiSet=pki_testing" | tee -a "$GITHUB_OUTPUT" fi - name: Determine image version @@ -211,11 +211,11 @@ jobs: } | tee -a "$GITHUB_OUTPUT" if [[ "${REF}" = "-" ]] && [[ "${STREAM}" = "stable" ]]; then - echo "imageNameShort=${IMAGE_VERSION}" >> "$GITHUB_OUTPUT" + echo "imageNameShort=${IMAGE_VERSION}" | tee -a "$GITHUB_OUTPUT" elif [[ "${REF}" = "-" ]]; then - echo "imageNameShort=stream/${STREAM}/${IMAGE_VERSION}" >> "$GITHUB_OUTPUT" + echo "imageNameShort=stream/${STREAM}/${IMAGE_VERSION}" | tee -a "$GITHUB_OUTPUT" else - echo "imageNameShort=ref/${REF}/stream/${STREAM}/${IMAGE_VERSION}" >> "$GITHUB_OUTPUT" + echo "imageNameShort=ref/${REF}/stream/${STREAM}/${IMAGE_VERSION}" | tee -a "$GITHUB_OUTPUT" fi make-os-image: diff --git a/.github/workflows/e2e-test-manual.yml b/.github/workflows/e2e-test-manual.yml index 3c97d9f23..87968d557 100644 --- a/.github/workflows/e2e-test-manual.yml +++ b/.github/workflows/e2e-test-manual.yml @@ -190,16 +190,13 @@ jobs: run: | case "${{ needs.split-cliImageVersion.outputs.image }}" in "") - echo "isDebugImage=true" >> "$GITHUB_OUTPUT" - echo "Image is debug image." + echo "isDebugImage=true" | tee -a "$GITHUB_OUTPUT" ;; *"/stream/debug/"*) - echo "isDebugImage=true" >> "$GITHUB_OUTPUT" - echo "Image is debug image." + echo "isDebugImage=true" | tee -a "$GITHUB_OUTPUT" ;; *) - echo "isDebugImage=false" >> "$GITHUB_OUTPUT" - echo "Image is not debug image." + echo "isDebugImage=false" | tee -a "$GITHUB_OUTPUT" ;; esac diff --git a/.github/workflows/e2e-test-release.yml b/.github/workflows/e2e-test-release.yml index e337d2056..f2f77597f 100644 --- a/.github/workflows/e2e-test-release.yml +++ b/.github/workflows/e2e-test-release.yml @@ -139,7 +139,7 @@ jobs: uuid=$(cat /proc/sys/kernel/random/uuid) name=e2e-test-${uuid%%-*} az group create --location northeurope --name "$name" --tags e2e - echo "res_group_name=$name" >> "$GITHUB_OUTPUT" + echo "res_group_name=$name" | tee -a "$GITHUB_OUTPUT" - name: Run E2E test id: e2e_test diff --git a/.github/workflows/purge-main.yml b/.github/workflows/purge-main.yml index 0dd51b3ab..b28a3b68d 100644 --- a/.github/workflows/purge-main.yml +++ b/.github/workflows/purge-main.yml @@ -33,13 +33,13 @@ jobs: run: | case "${{ github.event.schedule }}" in "0 0/3 * * *") - echo "stream=debug" >> "$GITHUB_OUTPUT" + echo "stream=debug" | tee -a "$GITHUB_OUTPUT" ;; "0 1/3 * * *") - echo "stream=console" >> "$GITHUB_OUTPUT" + echo "stream=console" | tee -a "$GITHUB_OUTPUT" ;; "0 2/3 * * *") - echo "stream=nightly" >> "$GITHUB_OUTPUT" + echo "stream=nightly" | tee -a "$GITHUB_OUTPUT" ;; *) echo "Unknown schedule: ${{ github.event.schedule }}" @@ -74,7 +74,7 @@ jobs: ver=$(echo "${deletable}" | head -n 1) echo "Deleting oldest version: ${ver}" - echo "version=${ver}" >> "$GITHUB_OUTPUT" + echo "version=${ver}" | tee -a "$GITHUB_OUTPUT" delete: name: Delete version diff --git a/.github/workflows/test-tidy.yml b/.github/workflows/test-tidy.yml index 9f0ce8c60..d84002953 100644 --- a/.github/workflows/test-tidy.yml +++ b/.github/workflows/test-tidy.yml @@ -85,11 +85,11 @@ jobs: diffsum=$(echo "$diff" | sha256sum| cut -d' ' -f1) if [[ "${{ steps.untidy.outputs.diffsum }}" == "${diffsum}" ]]; then echo "Everything is tidy." - echo "ungenerated=false" >> "$GITHUB_OUTPUT" + echo "ungenerated=false" | tee -a "$GITHUB_OUTPUT" exit 0 fi echo "Detected changes after tidy" - echo "ungenerated=true" >> "$GITHUB_OUTPUT" + echo "ungenerated=true" | tee -a "$GITHUB_OUTPUT" - name: Check if tidy or generate made modifications id: modified diff --git a/.github/workflows/versionsapi.yml b/.github/workflows/versionsapi.yml index dfeda4289..7bcc2f9a5 100644 --- a/.github/workflows/versionsapi.yml +++ b/.github/workflows/versionsapi.yml @@ -126,20 +126,20 @@ jobs: case "${{ inputs.command }}" in add) echo "Write access to S3 bucket required." - echo "write=true" >> "$GITHUB_OUTPUT" + echo "write=true" | tee -a "$GITHUB_OUTPUT" echo "No authentication at cloud provider required." - echo "auth=false" >> "$GITHUB_OUTPUT" + echo "auth=false" | tee -a "$GITHUB_OUTPUT" ;; remove) echo "Write access to S3 bucket required." - echo "write=true" >> "$GITHUB_OUTPUT" + echo "write=true" | tee -a "$GITHUB_OUTPUT" echo "Authentication at cloud provider required." - echo "auth=true" >> "$GITHUB_OUTPUT" + echo "auth=true" | tee -a "$GITHUB_OUTPUT" ;; latest | list) echo "Only read access required." - echo "write=false" >> "$GITHUB_OUTPUT" - echo "auth=false" >> "$GITHUB_OUTPUT" + echo "write=false" | tee -a "$GITHUB_OUTPUT" + echo "auth=false" | tee -a "$GITHUB_OUTPUT" ;; *) echo "Unknown command '${{ inputs.command }}'."