Skip to content

Commit a703e78

Browse files
committed
Use environment variable for output
1 parent 7c4f347 commit a703e78

7 files changed

Lines changed: 19 additions & 19 deletions

.github/workflows/check_required_files.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ jobs:
6666
6767
# Check if the list of reviewers contains the `stdlib-bot` user:
6868
if [[ $reviewers == *"stdlib-bot"* ]]; then
69-
echo "::set-output name=is_stdlib_bot::true"
69+
echo "is_stdlib_bot=true" >> $GITHUB_OUTPUT
7070
else
71-
echo "::set-output name=is_stdlib_bot::false"
71+
echo "is_stdlib_bot=false" >> $GITHUB_OUTPUT
7272
fi
7373
7474
# Configure git:
@@ -166,8 +166,8 @@ jobs:
166166
done
167167
168168
# Add the list of missing and required files to the workflow output:
169-
echo "::set-output name=missing_files::${missing_files[*]}"
170-
echo "::set-output name=required_files::${required_files[*]}"
169+
echo "missing_files=${missing_files[*]}" >> $GITHUB_OUTPUT
170+
echo "required_files=${required_files[*]}" >> $GITHUB_OUTPUT
171171
172172
body=""
173173
if [[ "${#missing_files[@]}" -eq 0 ]]; then
@@ -194,7 +194,7 @@ jobs:
194194
body="${body//'%'/'%25'}"
195195
body="${body//$'\n'/'%0A'}"
196196
body="${body//$'\r'/'%0D'}"
197-
echo "::set-output name=comment-body::${body}"
197+
echo "comment-body=${body}" >> $GITHUB_OUTPUT
198198
199199
shell: bash
200200
timeout-minutes: 10

.github/workflows/lint_changed_files.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ jobs:
204204
files=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr ' ' '\n' | grep -E '\.R$' | tr '\n' ' ' | sed 's/ $//')
205205
if [[ -n "${files}" ]]; then
206206
# Add space-separated list of R files to output:
207-
echo "::set-output name=files::${files}"
207+
echo "files=${files}" >> $GITHUB_OUTPUT
208208
else
209209
# Add empty string to output:
210-
echo "::set-output name=files::"
210+
echo "files=" >> $GITHUB_OUTPUT
211211
fi
212212
213213
# Setup R:

.github/workflows/markdown_equations.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
# Generate list of changed Markdown files:
9292
- name: 'Find changed Markdown files'
9393
run: |
94-
echo "::set-output name=files::$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .md | tr '\n' ' ')"
94+
echo "files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .md | tr '\n' ' ')" >> $GITHUB_OUTPUT
9595
id: changed
9696

9797
# Generate SVG equations:
@@ -102,12 +102,12 @@ jobs:
102102
103103
if [[ -z "$(git status --porcelain)" ]]; then
104104
# If no files were changed, exit with a success status code:
105-
echo "::set-output name=changed::false"
105+
echo "changed=false" >> $GITHUB_OUTPUT
106106
exit 0
107107
else
108108
# Otherwise, add changed files to the staging area and commit:
109109
git add -A && git commit -m "Add SVG equations"
110-
echo "::set-output name=changed::true"
110+
echo "changed=true" >> $GITHUB_OUTPUT
111111
fi
112112
timeout-minutes: 15
113113

@@ -120,12 +120,12 @@ jobs:
120120
121121
if [[ -z "$(git status --porcelain)" ]]; then
122122
# If no files were changed, exit with a success status code:
123-
echo "::set-output name=changed::false"
123+
echo "changed=false" >> $GITHUB_OUTPUT
124124
exit 0
125125
else
126126
# Otherwise, add changed files to the staging area and commit:
127127
git add -A && git commit -m "Update Markdown equation elements"
128-
echo "::set-output name=changed::true"
128+
echo "changed=true" >> $GITHUB_OUTPUT
129129
fi
130130
timeout-minutes: 15
131131

.github/workflows/markdown_tocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
# Generate list of namespace READMEs:
8585
- name: 'Generate list of namespace READMEs'
8686
run: |
87-
echo "::set-output name=files::$( make list-pkgs-namespace-readmes | tr '\n' ' ' )"
87+
echo "files=$( make list-pkgs-namespace-readmes | tr '\n' ' ' )" >> $GITHUB_OUTPUT
8888
id: namespace_files
8989

9090
# Update namespace table of contents:

.github/workflows/npm_downloads.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
id: package_name
5858
run: |
5959
name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'`
60-
echo "::set-output name=package_name::$name"
60+
echo "package_name=$name" >> $GITHUB_OUTPUT
6161
timeout-minutes: 5
6262

6363
# Fetch download data:
@@ -69,7 +69,7 @@ jobs:
6969
data=$(curl "$url")
7070
mkdir ./tmp
7171
echo "$data" > ./tmp/npm_downloads.json
72-
echo "::set-output name=data::$data"
72+
echo "data=$data" >> $GITHUB_OUTPUT
7373
timeout-minutes: 5
7474

7575
# Upload the download data:

.github/workflows/scaffold_pkg_via_branch_push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
run: |
9494
if [[ ${{ github.event.push.head.ref }} =~ ^scaffold-([0-9]+) ]]; then
9595
echo "Branch name contains an issue number: ${BASH_REMATCH[1]}"
96-
echo "::set-output name=issue-number::${BASH_REMATCH[1]}"
96+
echo "issue-number=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
9797
fi
9898
9999
# Add a comment to the pull request:

.github/workflows/scaffold_pkg_via_pull_request_assignment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
id: check-external
4343
run: |
4444
if [ ${{ github.event.pull_request.head.repo.owner.login }} = "stdlib-js" ]; then
45-
echo "::set-output name=external::false"
45+
echo "external=false" >> $GITHUB_OUTPUT
4646
else
47-
echo "::set-output name=external::true"
47+
echo "external=true" >> $GITHUB_OUTPUT
4848
fi
4949
5050
# Define a job for scaffolding a package based off `README.md` contents:
@@ -108,7 +108,7 @@ jobs:
108108
pkg_path=$(echo $pkg_path | sed 's/.*lib\/node_modules\/@stdlib\///g' | sed 's/\/README.md//g')
109109
110110
# Set package path as output:
111-
echo "::set-output name=pkg_path::$pkg_path"
111+
echo "pkg_path=$pkg_path" >> $GITHUB_OUTPUT
112112
113113
# Copy files from forked repository to new branch on `stdlib-js/stdlib` repository:
114114
- name: 'Copy files from forked repository to new branch on `stdlib-js/stdlib` repository'

0 commit comments

Comments
 (0)