Skip to content

Commit 165f6e4

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 6273088 commit 165f6e4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ jobs:
6565
# On stable PHPCS versions, allow for PHP deprecation notices.
6666
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
6767
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
68-
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, zend.assertions=1'
68+
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
6969
else
70-
echo '::set-output name=PHP_INI::error_reporting=-1, display_errors=On, zend.assertions=1'
70+
echo 'PHP_INI=error_reporting=-1, display_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
7171
fi
7272
7373
- name: Install PHP
@@ -133,9 +133,9 @@ jobs:
133133
# On stable PHPCS versions, allow for PHP deprecation notices.
134134
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
135135
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
136-
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, zend.assertions=1'
136+
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
137137
else
138-
echo '::set-output name=PHP_INI::error_reporting=-1, display_errors=On, zend.assertions=1'
138+
echo 'PHP_INI=error_reporting=-1, display_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
139139
fi
140140
141141
- name: Install PHP
@@ -156,7 +156,7 @@ jobs:
156156

157157
- name: Grab PHPUnit version
158158
id: phpunit_version
159-
run: echo ::set-output name=VERSION::$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')
159+
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT
160160

161161
- name: "DEBUG: Show grabbed version"
162162
run: echo ${{ steps.phpunit_version.outputs.VERSION }}

0 commit comments

Comments
 (0)