Skip to content

Commit

Permalink
fix(pdk): normalize used vendor cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 31, 2024
1 parent 3577df3 commit 17a7a4f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
25 changes: 8 additions & 17 deletions pdk-custom-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,6 @@ runs:
jq '.require["myparcelnl/pdk"] = "dev-'$REF'" | ."minimum-stability" = "dev"' composer.json > composer.json.tmp
mv composer.json.tmp composer.json
- name: 'Create composer flags'
id: composer-flags
shell: bash
#language=bash
run: |
composerFlags="--ignore-platform-req=ext-* --ignore-platform-req=lib-* --no-scripts --no-plugins --no-dev"
echo "flags=$composerFlags" >> $GITHUB_OUTPUT
- uses: myparcelnl/actions/pdk-cache@v4
with:
php-version: ${{ inputs.php-version }}
php-scoper-version: ${{ inputs.php-scoper-version }}
source-files: ${{ inputs.source-files }}
vendor-files: ${{ inputs.vendor-files }}
vendor-key: update-${{ steps.composer-flags.outputs.flags }}

- uses: myparcelnl/actions/pdk-setup@v4
id: setup
with:
Expand All @@ -112,6 +95,14 @@ runs:
php-version: ${{ inputs.php-version }}
yarn-args: '--no-immutable'

- uses: myparcelnl/actions/pdk-cache@v4
with:
php-version: ${{ inputs.php-version }}
php-scoper-version: ${{ inputs.php-scoper-version }}
source-files: ${{ inputs.source-files }}
vendor-files: ${{ inputs.vendor-files }}
vendor-key: update-${{ steps.setup.outputs.composer-flags }}

- name: 'Run pdk-builder update-self'
uses: myparcelnl/actions/pdk-builder@v4
with:
Expand Down
1 change: 1 addition & 0 deletions pdk-prerelease-pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ runs:
php-scoper-version: ${{ inputs.php-scoper-version }}
source-files: ${{ inputs.source-files }}
vendor-files: ${{ inputs.vendor-files }}
vendor-key: install-${{ steps.setup.outputs.composer-flags }}

- uses: myparcelnl/actions/pdk-release@v4
with:
Expand Down
1 change: 1 addition & 0 deletions pdk-prerelease-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ runs:
php-scoper-version: ${{ inputs.php-scoper-version }}
source-files: ${{ inputs.source-files }}
vendor-files: ${{ inputs.vendor-files }}
vendor-key: install-${{ steps.setup.outputs.composer-flags }}

- uses: myparcelnl/actions/pdk-release@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions pdk-setup-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ outputs:
description: 'The filename of the env file that was created.'
value: ${{ steps.setup-install.outputs.env-file || steps.setup-update.outputs.env-file }}

flags:
description: 'The flags that were used to install composer dependencies.'
value: ${{ steps.composer-flags.outputs.flags }}

runs:
using: composite
steps:
Expand Down
4 changes: 4 additions & 0 deletions pdk-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ outputs:
description: 'The filename of the env file that was created.'
value: ${{ steps.setup-backend.outputs.env-file }}

composer-flags:
description: 'The flags that were used to install composer dependencies.'
value: ${{ steps.setup-backend.outputs.flags }}

runs:
using: composite
steps:
Expand Down

0 comments on commit 17a7a4f

Please sign in to comment.