ci: Use GITHUB_OUTPUT envvar instead of set-output command (#3068)

* 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

* Patch up the remaining files too
This commit is contained in:
Arun Sathiya
2024-01-22 17:59:38 -08:00
committed by GitHub
parent 8e6ff2be8d
commit 64126bb84d
3 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4
- name: Get tag
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3) >> "$GITHUB_OUTPUT"
- name: Create Zip Folder
working-directory: dist
run: zip -r ../html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip ./

View File

@@ -14,7 +14,7 @@ jobs:
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v3
with:
path: ${{ steps.npm-cache.outputs.dir }}

View File

@@ -19,7 +19,7 @@ jobs:
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v3
with:
path: ${{ steps.npm-cache.outputs.dir }}