git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] ci: avoid using the deprecated `set-env` construct

From
Chris Webster <chris@webstech.net>
Date
Nov 7, 2020, 06:51 UTC
Message-ID
<CAGT1KpXgzaFUdvmZXHHTC6r2FjYY_6MCiZPHu++eje1mRJfmPQ@mail.gmail.com>
In-Reply-To
<pull.781.git.1604712106219.gitgitgadget@gmail.com>
Looks good.  Doing a similar change in a related repo.
...chris.

...chris. chris@webstech.net webstech.com

On Fri, Nov 6, 2020 at 5:21 PM Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 39 quoted lines
>
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> The `set-env` construct was deprecated as of the announcement in
> https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
>
> Let's use the recommended alternative instead.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>     ci: avoid using the deprecated set-env construct
>
>     This avoids an ugly warning (see e.g. this run
>     [https://github.com/gitgitgadget/git/actions/runs/350443139]).
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-781%2Fdscho%2Fno-set-env-in-github-workflows-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-781/dscho/no-set-env-in-github-workflows-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/781
>
>  .github/workflows/check-whitespace.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/.github/workflows/check-whitespace.yml b/.github/workflows/check-whitespace.yml
> index 9d070b9cdf..c74b47de9e 100644
> --- a/.github/workflows/check-whitespace.yml
> +++ b/.github/workflows/check-whitespace.yml
> @@ -14,7 +14,7 @@ jobs:
>      steps:
>      - name: Set commit count
>        shell: bash
> -      run: echo "::set-env name=COMMIT_DEPTH::$((1+$COMMITS))"
> +      run: echo "COMMIT_DEPTH=$((1+$COMMITS))" >>$GITHUB_ENV
>        env:
>          COMMITS: ${{ github.event.pull_request.commits }}
>
>
> base-commit: 7f7ebe054af6d831b999d6c2241b9227c4e4e08d
> --
> gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Junio C Hamano
Message 2 of 6 in “ci: avoid using the deprecated `set-env` construct”
  1. ci: avoid using the deprecated `set-env` constructJohannes Schindelin via GitGitGadget, Nov 7, 2020
  2. Chris WebsterNov 7, 2020
  3. Junio C HamanoNov 17, 2020
  4. Johannes SchindelinNov 17, 2020
  5. Junio C HamanoNov 17, 2020
  6. Johannes SchindelinNov 18, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.