From ae70b5fcf3b45539a5ced367b3d5304c6f005104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:02:59 +0200 Subject: [PATCH] Replace `set-output` with environment files in CI (#1806) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- .github/workflows/main.yml | 6 +++--- .github/workflows/netlify.yaml | 2 +- changelogs/internal/newsfragments/1806.clarification | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelogs/internal/newsfragments/1806.clarification diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94cc1a5b..09a184a7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -99,11 +99,11 @@ jobs: # the asterisk matching behaviour, not the literal string. run: | if [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then - echo ::set-output name=baseURL::/ + echo "baseURL=/" >> "$GITHUB_OUTPUT" elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then - echo ::set-output name=baseURL::"/${GITHUB_REF/refs\/tags\//}" + echo "baseURL=/${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT" else - echo ::set-output name=baseURL::/unstable + echo "baseURL=/unstable" >> "$GITHUB_OUTPUT" fi build-openapi: diff --git a/.github/workflows/netlify.yaml b/.github/workflows/netlify.yaml index 09360720..889d6eed 100644 --- a/.github/workflows/netlify.yaml +++ b/.github/workflows/netlify.yaml @@ -32,7 +32,7 @@ jobs: pr_number=$(curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' "$pulls_uri" | jq -r '.[] | .number') echo "PR number: $pr_number" - echo "::set-output name=prnumber::$pr_number" + echo "prnumber=$pr_number" >> "$GITHUB_OUTPUT" - name: '📥 Download artifact' uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4 diff --git a/changelogs/internal/newsfragments/1806.clarification b/changelogs/internal/newsfragments/1806.clarification new file mode 100644 index 00000000..88b875bb --- /dev/null +++ b/changelogs/internal/newsfragments/1806.clarification @@ -0,0 +1 @@ +Replace `set-output` with environment files in CI.