From 93775f6ca75060f86395427e993b5c393ec16a60 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Wed, 12 Oct 2022 10:22:24 +0100 Subject: [PATCH] GitHub Actions: replace deprecated set-output with GITHUB_OUTPUT (#2608) --- .github/actions/allure-report/action.yml | 4 ++-- .github/actions/download/action.yml | 4 ++-- .github/actions/neon-project-create/action.yml | 8 ++++---- .github/actions/neon-project-delete/action.yml | 2 +- .github/workflows/benchmarking.yml | 2 +- .github/workflows/build_and_test.yml | 14 +++++++------- .github/workflows/codestyle.yml | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/actions/allure-report/action.yml b/.github/actions/allure-report/action.yml index ec751f51fc..dfb314571b 100644 --- a/.github/actions/allure-report/action.yml +++ b/.github/actions/allure-report/action.yml @@ -47,7 +47,7 @@ runs: else key=branch-$(echo ${GITHUB_REF#refs/heads/} | tr -c "[:alnum:]._-" "-") fi - echo "::set-output name=KEY::${key}" + echo "KEY=${key}" >> $GITHUB_OUTPUT - uses: actions/setup-java@v3 if: ${{ inputs.action == 'generate' }} @@ -186,7 +186,7 @@ runs: aws s3 cp --only-show-errors ./index.html "s3://${BUCKET}/${REPORT_PREFIX}/latest/index.html" echo "[Allure Report](${REPORT_URL})" >> ${GITHUB_STEP_SUMMARY} - echo "::set-output name=report-url::${REPORT_URL}" + echo "report-url=${REPORT_URL}" >> $GITHUB_OUTPUT - name: Release Allure lock if: ${{ inputs.action == 'generate' && always() }} diff --git a/.github/actions/download/action.yml b/.github/actions/download/action.yml index 731ef6639d..eb34d4206a 100644 --- a/.github/actions/download/action.yml +++ b/.github/actions/download/action.yml @@ -34,7 +34,7 @@ runs: S3_KEY=$(aws s3api list-objects-v2 --bucket ${BUCKET} --prefix ${PREFIX%$GITHUB_RUN_ATTEMPT} | jq -r '.Contents[].Key' | grep ${FILENAME} | sort --version-sort | tail -1 || true) if [ -z "${S3_KEY}" ]; then if [ "${SKIP_IF_DOES_NOT_EXIST}" = "true" ]; then - echo '::set-output name=SKIPPED::true' + echo 'SKIPPED=true' >> $GITHUB_OUTPUT exit 0 else echo 2>&1 "Neither s3://${BUCKET}/${PREFIX}/${FILENAME} nor its version from previous attempts exist" @@ -42,7 +42,7 @@ runs: fi fi - echo '::set-output name=SKIPPED::false' + echo 'SKIPPED=false' >> $GITHUB_OUTPUT mkdir -p $(dirname $ARCHIVE) time aws s3 cp --only-show-errors s3://${BUCKET}/${S3_KEY} ${ARCHIVE} diff --git a/.github/actions/neon-project-create/action.yml b/.github/actions/neon-project-create/action.yml index 2f58ae77ad..b4fd151582 100644 --- a/.github/actions/neon-project-create/action.yml +++ b/.github/actions/neon-project-create/action.yml @@ -41,8 +41,8 @@ runs: ;; esac - echo "::set-output name=api_host::${API_HOST}" - echo "::set-output name=region_id::${REGION_ID}" + echo "api_host=${API_HOST}" >> $GITHUB_OUTPUT + echo "region_id=${REGION_ID}" >> $GITHUB_OUTPUT env: ENVIRONMENT: ${{ inputs.environment }} REGION_ID: ${{ inputs.region_id }} @@ -72,10 +72,10 @@ runs: dsn=$(echo $project | jq --raw-output '.roles[] | select(.name != "web_access") | .dsn')/main echo "::add-mask::${dsn}" - echo "::set-output name=dsn::${dsn}" + echo "dsn=${dsn}" >> $GITHUB_OUTPUT project_id=$(echo $project | jq --raw-output '.id') - echo "::set-output name=project_id::${project_id}" + echo "project_id=${project_id}" >> $GITHUB_OUTPUT env: API_KEY: ${{ inputs.api_key }} API_HOST: ${{ steps.parse-input.outputs.api_host }} diff --git a/.github/actions/neon-project-delete/action.yml b/.github/actions/neon-project-delete/action.yml index e7c6f58901..d417c489ef 100644 --- a/.github/actions/neon-project-delete/action.yml +++ b/.github/actions/neon-project-delete/action.yml @@ -32,7 +32,7 @@ runs: ;; esac - echo "::set-output name=api_host::${API_HOST}" + echo "api_host=${API_HOST}" >> $GITHUB_OUTPUT env: ENVIRONMENT: ${{ inputs.environment }} diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index 6c7dce9beb..dee5968ef3 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -204,7 +204,7 @@ jobs: ;; esac - echo "::set-output name=connstr::${CONNSTR}" + echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT psql ${CONNSTR} -c "SELECT version();" env: diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 7cc8715526..2c6aa02b22 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -35,12 +35,12 @@ jobs: echo ref:$GITHUB_REF_NAME echo rev:$(git rev-list --count HEAD) if [[ "$GITHUB_REF_NAME" == "main" ]]; then - echo "::set-output name=tag::$(git rev-list --count HEAD)" + echo "tag=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT elif [[ "$GITHUB_REF_NAME" == "release" ]]; then - echo "::set-output name=tag::release-$(git rev-list --count HEAD)" + echo "tag=release-$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT else echo "GITHUB_REF_NAME (value '$GITHUB_REF_NAME') is not set to either 'main' or 'release'" - echo "::set-output name=tag::$GITHUB_RUN_ID" + echo "tag=$GITHUB_RUN_ID" >> $GITHUB_OUTPUT fi shell: bash id: build-tag @@ -78,12 +78,12 @@ jobs: - name: Set pg 14 revision for caching id: pg_v14_rev - run: echo ::set-output name=pg_rev::$(git rev-parse HEAD:vendor/postgres-v14) + run: echo pg_rev=$(git rev-parse HEAD:vendor/postgres-v14) >> $GITHUB_OUTPUT shell: bash -euxo pipefail {0} - name: Set pg 15 revision for caching id: pg_v15_rev - run: echo ::set-output name=pg_rev::$(git rev-parse HEAD:vendor/postgres-v15) + run: echo pg_rev=$(git rev-parse HEAD:vendor/postgres-v15) >> $GITHUB_OUTPUT shell: bash -euxo pipefail {0} # Set some environment variables used by all the steps. @@ -671,10 +671,10 @@ jobs: if [[ "$GITHUB_REF_NAME" == "main" ]]; then STAGING='{"env_name": "staging", "proxy_job": "neon-proxy", "proxy_config": "staging.proxy", "kubeconfig_secret": "STAGING_KUBECONFIG_DATA"}' NEON_STRESS='{"env_name": "neon-stress", "proxy_job": "neon-stress-proxy", "proxy_config": "neon-stress.proxy", "kubeconfig_secret": "NEON_STRESS_KUBECONFIG_DATA"}' - echo "::set-output name=include::[$STAGING, $NEON_STRESS]" + echo "include=[$STAGING, $NEON_STRESS]" >> $GITHUB_OUTPUT elif [[ "$GITHUB_REF_NAME" == "release" ]]; then PRODUCTION='{"env_name": "production", "proxy_job": "neon-proxy", "proxy_config": "production.proxy", "kubeconfig_secret": "PRODUCTION_KUBECONFIG_DATA"}' - echo "::set-output name=include::[$PRODUCTION]" + echo "include=[$PRODUCTION]" >> $GITHUB_OUTPUT else echo "GITHUB_REF_NAME (value '$GITHUB_REF_NAME') is not set to either 'main' or 'release'" exit 1 diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 6d39958bab..961d811a51 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -56,12 +56,12 @@ jobs: - name: Set pg 14 revision for caching id: pg_v14_rev - run: echo ::set-output name=pg_rev::$(git rev-parse HEAD:vendor/postgres-v14) + run: echo pg_rev=$(git rev-parse HEAD:vendor/postgres-v14) >> $GITHUB_OUTPUT shell: bash -euxo pipefail {0} - name: Set pg 15 revision for caching id: pg_v15_rev - run: echo ::set-output name=pg_rev::$(git rev-parse HEAD:vendor/postgres-v15) + run: echo pg_rev=$(git rev-parse HEAD:vendor/postgres-v15) >> $GITHUB_OUTPUT shell: bash -euxo pipefail {0} - name: Cache postgres v14 build