Skip to content

Commit 8272406

Browse files
committed
Migrate workflows from deprecated set-output commands
GitHub Actions provides the capability for workflow authors to use the capabilities of the GitHub Actions ToolKit package directly in the `run` keys of workflows via "workflow commands". One such command is `set-output`, which allows data to be passed out of a workflow step as an output. It has been determined that this command has potential to be a security risk in some applications. For this reason, GitHub has deprecated the command and a warning of this is shown in the workflow run summary page of any workflow using it: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ The identical capability is now provided in a safer form via the GitHub Actions "environment files" system. Migrating the use of the deprecated workflow commands to use the `GITHUB_OUTPUT` environment file instead fixes any potential vulnerabilities in the workflows, resolves the warnings, and avoids the eventual complete breakage of the workflows that would result from GitHub's planned removal of the `set-output` workflow command 2023-05-31.
1 parent 76cf6c8 commit 8272406

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+58
-58
lines changed

.github/workflows/check-markdown-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
RESULT="false"
6161
fi
6262
63-
echo "::set-output name=result::$RESULT"
63+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6464
6565
lint:
6666
needs: run-determination

.github/workflows/check-python-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
RESULT="false"
5757
fi
5858
59-
echo "::set-output name=result::$RESULT"
59+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6060
6161
lint:
6262
needs: run-determination

.github/workflows/check-shell-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
RESULT="false"
4747
fi
4848
49-
echo "::set-output name=result::$RESULT"
49+
echo "result=$RESULT" >> $GITHUB_OUTPUT
5050
5151
lint:
5252
name: ${{ matrix.configuration.name }}

.github/workflows/check-yaml-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
RESULT="false"
6969
fi
7070
71-
echo "::set-output name=result::$RESULT"
71+
echo "result=$RESULT" >> $GITHUB_OUTPUT
7272
7373
check:
7474
name: ${{ matrix.configuration.name }}

.github/workflows/sync-labels-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
run: |
113113
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
114114
# configuration.
115-
echo "::set-output name=flag::--dry-run"
115+
echo "flag=--dry-run" >> $GITHUB_OUTPUT
116116
117117
- name: Checkout repository
118118
uses: actions/checkout@v3

.github/workflows/test-python-poetry-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
RESULT="false"
5353
fi
5454
55-
echo "::set-output name=result::$RESULT"
55+
echo "result=$RESULT" >> $GITHUB_OUTPUT
5656
5757
test:
5858
needs: run-determination

workflow-templates/check-certificates.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
RESULT="false"
6060
fi
6161
62-
echo "::set-output name=result::$RESULT"
62+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6363
6464
check-certificates:
6565
name: ${{ matrix.certificate.identifier }}
@@ -144,7 +144,7 @@ jobs:
144144
echo "Certificate expiration date: $EXPIRATION_DATE"
145145
echo "Days remaining before expiration: $DAYS_BEFORE_EXPIRATION"
146146
147-
echo "::set-output name=days::$DAYS_BEFORE_EXPIRATION"
147+
echo "days=$DAYS_BEFORE_EXPIRATION" >> $GITHUB_OUTPUT
148148
149149
- name: Check if expiration notification period has been reached
150150
id: check-expiration

workflow-templates/check-go-dependencies-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
RESULT="false"
5757
fi
5858
59-
echo "::set-output name=result::$RESULT"
59+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6060
6161
check-cache:
6262
needs: run-determination

workflow-templates/check-go-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
RESULT="false"
5151
fi
5252
53-
echo "::set-output name=result::$RESULT"
53+
echo "result=$RESULT" >> $GITHUB_OUTPUT
5454
5555
check-errors:
5656
name: check-errors (${{ matrix.module.path }})

workflow-templates/check-license.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
RESULT="false"
5757
fi
5858
59-
echo "::set-output name=result::$RESULT"
59+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6060
6161
check-license:
6262
needs: run-determination

0 commit comments

Comments
 (0)