From 03fc03642836e5d9edeb70a833f2de15dc649b74 Mon Sep 17 00:00:00 2001 From: Arun Sathiya Date: Thu, 18 Jan 2024 13:43:06 -0800 Subject: [PATCH] ci: Use GITHUB_OUTPUT envvar instead of set-output command `save-state` and `set-output` commands used in GitHub Actions are deprecated and [GitHub recommends using environment files](https://github.blog/changelog/2023-07-24-github-actions-update-on-save-state-and-set-output-commands/). This PR updates the usage of `set-output` to `$GITHUB_OUTPUT` Instructions for envvar usage from GitHub docs: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f92b75..27b39de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: run: | changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" + echo "changed=true" >> $GITHUB_OUTPUT fi - name: Helm - Run chart-testing (lint) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e51fdeb..bb21b18 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,7 @@ jobs: # The :11 strips the first 11 characters from the environment variable GITHUB_REF which contains refs/tags/v1.2.3 so it yields 1.2.3 - name: Set release version (i.e. tag) id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/v} + run: echo "tag=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT - name: Print the release version (i.e. tag) run: echo "TAG = ${{ steps.vars.outputs.tag }}"