diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index 11d97639a30fc..2b3af18e9cc5d 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -17,7 +17,6 @@ jobs: # Performs the following steps: # - Checks out the repository. # - Sets up Node.js. - # - Configures caching for Composer. # - Installs Composer dependencies. # - Logs general debug information about the runner. # - Installs npm dependencies. @@ -47,18 +46,12 @@ jobs: node-version-file: '.nvmrc' cache: npm - # This date is used to ensure that the PHPCS cache is cleared at least once every week. - # http://man7.org/linux/man-pages/man1/date.1.html - - name: "Get last Monday's date" - id: get-date - run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> "$GITHUB_OUTPUT" - # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 with: - custom-cache-suffix: ${{ steps.get-date.outputs.date }} + custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") - name: Log debug information run: | diff --git a/.github/workflows/reusable-phpstan-static-analysis-v1.yml b/.github/workflows/reusable-phpstan-static-analysis-v1.yml index cc83be9c73896..942478536f4b6 100644 --- a/.github/workflows/reusable-phpstan-static-analysis-v1.yml +++ b/.github/workflows/reusable-phpstan-static-analysis-v1.yml @@ -24,8 +24,8 @@ jobs: # Performs the following steps: # - Checks out the repository. # - Sets up PHP. - # - Logs debug information. # - Installs Composer dependencies. + # - Logs debug information. # - Configures caching for PHP static analysis scans. # - Make Composer packages available globally. # - Runs PHPStan static analysis (with Pull Request annotations). @@ -58,11 +58,12 @@ jobs: coverage: none tools: cs2pr - # This date is used to ensure that the Composer cache is cleared at least once every week. - # http://man7.org/linux/man-pages/man1/date.1.html - - name: "Get last Monday's date" - id: get-date - run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> "$GITHUB_OUTPUT" + # Since Composer dependencies are installed using `composer update` and no lock file is in version control, + # passing a custom cache suffix ensures that the cache is flushed at least once per week. + - name: Install Composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 + with: + custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") - name: General debug information run: | @@ -70,13 +71,6 @@ jobs: node --version composer --version - # Since Composer dependencies are installed using `composer update` and no lock file is in version control, - # passing a custom cache suffix ensures that the cache is flushed at least once per week. - - name: Install Composer dependencies - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 - with: - custom-cache-suffix: ${{ steps.get-date.outputs.date }} - - name: Make Composer packages available globally run: echo "${PWD}/vendor/bin" >> "$GITHUB_PATH"