From 98dbd92b741aca691d27957aeb49622414a95d71 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 20 Sep 2023 08:36:04 -0400 Subject: [PATCH 1/3] Fix GitHub Action deprecated notices. This fixes several deprecated notices caused by the use of `set-output` and `save-output` in GitHub Action workflows. These were deprecated, and could be removed at any time without notice. GitHub posted an update on July 24th that they still plan on removing these commands but were delaying the removal because of continued high usage. More can be found about this in the announcement posts: - https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - https://github.blog/changelog/2023-07-24-github-actions-update-on-save-state-and-set-output-commands/ --- .github/workflows/cypress-tests.yml | 8 ++++---- .github/workflows/lint-php.yml | 2 +- .github/workflows/satis-webhook.yml | 4 ++-- .github/workflows/upload-artifact-on-push.yml | 8 ++++---- .github/workflows/upload-asset-on-release.yml | 8 ++++---- .github/workflows/wp-i18n.yml | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cypress-tests.yml b/.github/workflows/cypress-tests.yml index bee3e605..2d01b00e 100644 --- a/.github/workflows/cypress-tests.yml +++ b/.github/workflows/cypress-tests.yml @@ -44,8 +44,8 @@ jobs: REPO: ${{ github.repository }} run: | mkdir dist - echo ::set-output name=DIST::${PWD}/dist - echo ::set-output name=PACKAGE::${REPO##*/} + echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT + echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT - name: Use Node.js 16.x uses: actions/setup-node@v3 @@ -54,7 +54,7 @@ jobs: - name: Get npm cache directory id: npm-cache - run: echo "::set-output name=dir::$(npm config get cache)" + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - name: Cache node modules uses: actions/cache@v3 @@ -66,7 +66,7 @@ jobs: - name: Get Composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer vendor directory uses: actions/cache@v3 diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index e211a2f2..db2e1f4c 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -38,7 +38,7 @@ jobs: - name: Get Composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT if: "!! env.GIT_DIFF" - name: Cache Composer vendor directory diff --git a/.github/workflows/satis-webhook.yml b/.github/workflows/satis-webhook.yml index 7067b8bb..757a8712 100644 --- a/.github/workflows/satis-webhook.yml +++ b/.github/workflows/satis-webhook.yml @@ -15,11 +15,11 @@ jobs: id: package env: REPO: ${{ github.repository }} - run: echo ::set-output name=PACKAGE::${REPO##*/} + run: echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT - name: Set Version id: tag - run: echo ::set-output name=VERSION::${GITHUB_REF##*/} + run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT - name: Repository Dispatch uses: peter-evans/repository-dispatch@v2 diff --git a/.github/workflows/upload-artifact-on-push.yml b/.github/workflows/upload-artifact-on-push.yml index fbaed146..786c84b8 100644 --- a/.github/workflows/upload-artifact-on-push.yml +++ b/.github/workflows/upload-artifact-on-push.yml @@ -40,8 +40,8 @@ jobs: REPO: ${{ github.repository }} run: | mkdir dist - echo ::set-output name=DIST::${PWD}/dist - echo ::set-output name=PACKAGE::${REPO##*/} + echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT + echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT - name: Use Node.js 16.x uses: actions/setup-node@v3 @@ -50,7 +50,7 @@ jobs: - name: Get npm cache directory id: npm-cache - run: echo "::set-output name=dir::$(npm config get cache)" + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - name: Cache node modules uses: actions/cache@v3 @@ -62,7 +62,7 @@ jobs: - name: Get Composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer vendor directory uses: actions/cache@v3 diff --git a/.github/workflows/upload-asset-on-release.yml b/.github/workflows/upload-asset-on-release.yml index bea625fb..d9f13d80 100644 --- a/.github/workflows/upload-asset-on-release.yml +++ b/.github/workflows/upload-asset-on-release.yml @@ -50,8 +50,8 @@ jobs: REPO: ${{ github.repository }} run: | mkdir dist - echo ::set-output name=DIST::${PWD}/dist - echo ::set-output name=PACKAGE::${REPO##*/} + echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT + echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT - name: Use Node.js 16.x uses: actions/setup-node@v3 @@ -60,7 +60,7 @@ jobs: - name: Get npm cache directory id: npm-cache - run: echo "::set-output name=dir::$(npm config get cache)" + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - name: Cache node modules uses: actions/cache@v3 @@ -72,7 +72,7 @@ jobs: - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer vendor directory uses: actions/cache@v3 diff --git a/.github/workflows/wp-i18n.yml b/.github/workflows/wp-i18n.yml index 93b68f25..6a0dff9f 100644 --- a/.github/workflows/wp-i18n.yml +++ b/.github/workflows/wp-i18n.yml @@ -24,8 +24,8 @@ jobs: REPO: ${{ github.repository }} run: | mkdir dist - echo ::set-output name=DIST::${PWD}/dist - echo ::set-output name=PACKAGE::${REPO##*/} + echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT + echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -36,7 +36,7 @@ jobs: - name: Get Composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer vendor directory uses: actions/cache@v3 From ace730f8822abbbc1b6e5a261c0f6b0955b32b61 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 20 Sep 2023 10:00:29 -0400 Subject: [PATCH 2/3] Remove use of UnicornGlobal/has-changes-action action. This action contains an occurrance of `set-output`, which has been depreceted and will soon be removed. --- .github/workflows/wp-i18n.yml | 7 ++++--- test.txt | 0 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 test.txt diff --git a/.github/workflows/wp-i18n.yml b/.github/workflows/wp-i18n.yml index 6a0dff9f..4eea528e 100644 --- a/.github/workflows/wp-i18n.yml +++ b/.github/workflows/wp-i18n.yml @@ -72,10 +72,11 @@ jobs: - name: Check if there are file changes id: changes - uses: UnicornGlobal/has-changes-action@v1.0.12 + continue-on-error: true + run: git diff --exit-code - name: Commit web files - if: steps.changes.outputs.changed == 1 + if: steps.changes.outcome == 'failure' run: | git config --local user.name "${{ github.event.head_commit.author.name }}" git config --local user.email "${{ github.event.head_commit.author.email }}" @@ -85,7 +86,7 @@ jobs: git status - name: Push changes - if: steps.changes.outputs.changed == 1 + if: steps.changes.outcome == 'failure' uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/test.txt b/test.txt new file mode 100644 index 00000000..e69de29b From 1b3b1b0b8da66f585cd15cea857bfe43c7163f79 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 20 Sep 2023 10:09:21 -0400 Subject: [PATCH 3/3] Remove test file accidentally added. --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29b..00000000