mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-12 13:56:34 +00:00
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.
This commit is contained in:
parent
b998d35524
commit
8a85b5c3d8
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -183,7 +183,7 @@ jobs:
|
|||||||
OUTPUT_SAFE_BODY="${BODY//'%'/'%25'}"
|
OUTPUT_SAFE_BODY="${BODY//'%'/'%25'}"
|
||||||
OUTPUT_SAFE_BODY="${OUTPUT_SAFE_BODY//$'\n'/'%0A'}"
|
OUTPUT_SAFE_BODY="${OUTPUT_SAFE_BODY//$'\n'/'%0A'}"
|
||||||
OUTPUT_SAFE_BODY="${OUTPUT_SAFE_BODY//$'\r'/'%0D'}"
|
OUTPUT_SAFE_BODY="${OUTPUT_SAFE_BODY//$'\r'/'%0D'}"
|
||||||
echo "::set-output name=BODY::$OUTPUT_SAFE_BODY"
|
echo "BODY=$OUTPUT_SAFE_BODY" >> $GITHUB_OUTPUT
|
||||||
echo "$BODY" > CHANGELOG.txt
|
echo "$BODY" > CHANGELOG.txt
|
||||||
|
|
||||||
- name: Upload Changelog [GitHub Actions]
|
- name: Upload Changelog [GitHub Actions]
|
||||||
@ -228,7 +228,7 @@ jobs:
|
|||||||
- name: Get Tag
|
- name: Get Tag
|
||||||
id: tag_name
|
id: tag_name
|
||||||
run: |
|
run: |
|
||||||
echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}
|
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Publish Release [GitHub]
|
- name: Publish Release [GitHub]
|
||||||
uses: svenstaro/upload-release-action@2.3.0
|
uses: svenstaro/upload-release-action@2.3.0
|
||||||
|
2
.github/workflows/check-certificates.yml
vendored
2
.github/workflows/check-certificates.yml
vendored
@ -108,7 +108,7 @@ jobs:
|
|||||||
echo "Certificate expiration date: $EXPIRATION_DATE"
|
echo "Certificate expiration date: $EXPIRATION_DATE"
|
||||||
echo "Days remaining before expiration: $DAYS_BEFORE_EXPIRATION"
|
echo "Days remaining before expiration: $DAYS_BEFORE_EXPIRATION"
|
||||||
|
|
||||||
echo "::set-output name=days::$DAYS_BEFORE_EXPIRATION"
|
echo "days=$DAYS_BEFORE_EXPIRATION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Check if expiration notification period has been reached
|
- name: Check if expiration notification period has been reached
|
||||||
id: check-expiration
|
id: check-expiration
|
||||||
|
2
.github/workflows/compose-full-changelog.yml
vendored
2
.github/workflows/compose-full-changelog.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
|||||||
- name: Get Tag
|
- name: Get Tag
|
||||||
id: tag_name
|
id: tag_name
|
||||||
run: |
|
run: |
|
||||||
echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}
|
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create full changelog
|
- name: Create full changelog
|
||||||
id: full-changelog
|
id: full-changelog
|
||||||
|
2
.github/workflows/sync-labels.yml
vendored
2
.github/workflows/sync-labels.yml
vendored
@ -103,7 +103,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
|
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
|
||||||
# configuration.
|
# configuration.
|
||||||
echo "::set-output name=flag::--dry-run"
|
echo "flag=--dry-run" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user