Make WordPress Core

Changeset 62443


Ignore:
Timestamp:
06/02/2026 06:00:27 AM (3 months ago)
Author:
desrosj
Message:

Build/Test Tools: Configure Composer caching with input where possible.

This removes an unnecessary step and output/input when the date used for cache keys is only used in one place by passing the command directly through the custom-cache-key input.

See #64893.

Location:
trunk/.github/workflows
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/reusable-check-built-files.yml

    r62404 r62443  
    1818  # - Checks out the repository.
    1919  # - Sets up Node.js.
    20   # - Configures caching for Composer.
    2120  # - Installs Composer dependencies.
    2221  # - Logs general debug information about the runner.
     
    4948          cache: npm
    5049
    51       # This date is used to ensure that the PHPCS cache is cleared at least once every week.
    52       # http://man7.org/linux/man-pages/man1/date.1.html
    53       - name: "Get last Monday's date"
    54         id: get-date
    55         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> "$GITHUB_OUTPUT"
    56 
    5750      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
    5851      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
     
    6053        uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
    6154        with:
    62           custom-cache-suffix: ${{ steps.get-date.outputs.date }}
     55          custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
    6356
    6457      - name: Log debug information
  • trunk/.github/workflows/reusable-phpstan-static-analysis-v1.yml

    r62404 r62443  
    2525  # - Checks out the repository.
    2626  # - Sets up PHP.
     27  # - Installs Composer dependencies.
    2728  # - Logs debug information.
    28   # - Installs Composer dependencies.
    2929  # - Configures caching for PHP static analysis scans.
    3030  # - Make Composer packages available globally.
     
    5959          tools: cs2pr
    6060
    61       # This date is used to ensure that the Composer cache is cleared at least once every week.
    62       # http://man7.org/linux/man-pages/man1/date.1.html
    63       - name: "Get last Monday's date"
    64         id: get-date
    65         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> "$GITHUB_OUTPUT"
    66 
    6761      - name: General debug information
    6862        run: |
     
    7670        uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
    7771        with:
    78           custom-cache-suffix: ${{ steps.get-date.outputs.date }}
     72          custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
    7973
    8074      - name: Make Composer packages available globally
Note: See TracChangeset for help on using the changeset viewer.