Skip to content

Commit e76fb83

Browse files
committed
GH Actions: fix use of deprecated set-output
GitHub has deprecated the use of `set-output` (and `set-state`) in favour of new environment files. This commit updates workflows to use the new methodology. Refs: * https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ * https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
1 parent 3a2cdfb commit e76fb83

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/workflows/quicktest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ jobs:
4949
id: set_ini
5050
run: |
5151
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
52-
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On'
52+
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On' >> $GITHUB_OUTPUT
5353
else
54-
echo '::set-output name=PHP_INI::error_reporting=-1, display_errors=On'
54+
echo 'PHP_INI=error_reporting=-1, display_errors=On' >> $GITHUB_OUTPUT
5555
fi
5656
5757
- name: Install PHP

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ jobs:
8181
# On stable PHPCS versions, allow for PHP deprecation notices.
8282
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
8383
if [[ "${{ matrix.phpcs_version }}" != "dev-master" && "${{ matrix.phpcs_version }}" != "4.0.x-dev" ]]; then
84-
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On'
84+
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On' >> $GITHUB_OUTPUT
8585
else
86-
echo '::set-output name=PHP_INI::error_reporting=-1, display_errors=On'
86+
echo 'PHP_INI=error_reporting=-1, display_errors=On' >> $GITHUB_OUTPUT
8787
fi
8888
8989
- name: Install PHP

.github/workflows/update-website.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
REF: ${{ github.ref }}
4040
run: |
4141
if [ "${{ github.event_name }}" == "pull_request" ]; then
42-
echo "::set-output name=BRANCH::$REF"
42+
echo "BRANCH=$REF" >> $GITHUB_OUTPUT
4343
else
44-
echo '::set-output name=BRANCH::stable'
44+
echo 'BRANCH=stable' >> $GITHUB_OUTPUT
4545
fi
4646
4747
- name: Checkout code
@@ -65,7 +65,7 @@ jobs:
6565
SHA: ${{ github.sha }}
6666
run: |
6767
shortsha=$(echo "$SHA" | cut -b 1-6)
68-
echo "::set-output name=SHORTSHA::$shortsha"
68+
echo "SHORTSHA=$shortsha" >> $GITHUB_OUTPUT
6969
7070
- name: Prepare commit message
7171
id: commit_msg
@@ -74,9 +74,9 @@ jobs:
7474
COMMIT_MSG: ${{ github.event.head_commit.message }}
7575
run: |
7676
if [[ "${{ github.event_name }}" == 'push' && "${{ github.ref_type }}" == 'tag' ]]; then
77-
echo "::set-output name=MSG::Update website for release of version $REF_NAME"
77+
echo "MSG=Update website for release of version $REF_NAME" >> $GITHUB_OUTPUT
7878
else
79-
echo "::set-output name=MSG::Sync website after commit (sha: ${{ steps.set_sha.outputs.SHORTSHA }})"
79+
echo "MSG=Sync website after commit (sha: ${{ steps.set_sha.outputs.SHORTSHA }})" >> $GITHUB_OUTPUT
8080
fi
8181
8282
- name: Check GitHub Pages status

0 commit comments

Comments
 (0)