mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
feat(check-extension): enable stamp caching (#248)
Adds an optional `stamp` boolean input on the public check-extension workflow that is forwarded to cache-magento, plus the matching `working-directory`. Internal CI exercises stamp:true.
This commit is contained in:
@@ -39,3 +39,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: _test/demo-package
|
path: _test/demo-package
|
||||||
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
||||||
|
stamp: true
|
||||||
|
|||||||
@@ -27,9 +27,15 @@ on:
|
|||||||
composer_cache_key:
|
composer_cache_key:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
default: "_mageos"
|
default: ""
|
||||||
description: A key to version the composer cache. Can be incremented if you need to bust the cache.
|
description: A key to version the composer cache. Can be incremented if you need to bust the cache.
|
||||||
|
|
||||||
|
stamp:
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
description: "Cache the vendor/ directory in addition to the Composer download cache."
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
composer_auth:
|
composer_auth:
|
||||||
required: false
|
required: false
|
||||||
@@ -54,10 +60,6 @@ jobs:
|
|||||||
magento_repository: ${{ inputs.magento_repository }}
|
magento_repository: ${{ inputs.magento_repository }}
|
||||||
composer_auth: ${{ secrets.composer_auth }}
|
composer_auth: ${{ secrets.composer_auth }}
|
||||||
|
|
||||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
|
||||||
with:
|
|
||||||
composer_cache_key: ${{ inputs.composer_cache_key }}
|
|
||||||
|
|
||||||
- name: Add extension repository
|
- name: Add extension repository
|
||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
||||||
@@ -70,6 +72,15 @@ jobs:
|
|||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
run: composer require "${{ steps.package.outputs.name }}:@dev" --no-install
|
run: composer require "${{ steps.package.outputs.name }}:@dev" --no-install
|
||||||
|
|
||||||
|
- run: composer update --no-install
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
|
||||||
|
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||||
|
with:
|
||||||
|
composer_cache_key: ${{ inputs.composer_cache_key && format('{0} | {1}', inputs.composer_cache_key, matrix.magento) || matrix.magento }}
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
stamp: ${{ inputs.stamp }}
|
||||||
|
|
||||||
- name: Composer install
|
- name: Composer install
|
||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
run: composer install
|
run: composer install
|
||||||
@@ -114,10 +125,6 @@ jobs:
|
|||||||
magento_repository: ${{ inputs.magento_repository }}
|
magento_repository: ${{ inputs.magento_repository }}
|
||||||
composer_auth: ${{ secrets.composer_auth }}
|
composer_auth: ${{ secrets.composer_auth }}
|
||||||
|
|
||||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
|
||||||
with:
|
|
||||||
composer_cache_key: ${{ inputs.composer_cache_key }}
|
|
||||||
|
|
||||||
- name: Add extension repository
|
- name: Add extension repository
|
||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
||||||
@@ -132,6 +139,15 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||||
|
|
||||||
|
- run: composer update --no-install
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
|
||||||
|
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||||
|
with:
|
||||||
|
composer_cache_key: ${{ inputs.composer_cache_key && format('{0} | {1}', inputs.composer_cache_key, matrix.magento) || matrix.magento }}
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
stamp: ${{ inputs.stamp }}
|
||||||
|
|
||||||
- name: Composer install
|
- name: Composer install
|
||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
run: composer install
|
run: composer install
|
||||||
@@ -157,6 +173,10 @@ jobs:
|
|||||||
tools: composer:v${{ matrix.composer }}
|
tools: composer:v${{ matrix.composer }}
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
|
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||||
|
with:
|
||||||
|
composer_cache_key: ${{ inputs.composer_cache_key && format('{0} | {1}', inputs.composer_cache_key, matrix.magento) || matrix.magento }}
|
||||||
|
|
||||||
- uses: graycoreio/github-actions-magento2/coding-standard@main
|
- uses: graycoreio/github-actions-magento2/coding-standard@main
|
||||||
with:
|
with:
|
||||||
path: ${{ inputs.path }}
|
path: ${{ inputs.path }}
|
||||||
@@ -181,10 +201,6 @@ jobs:
|
|||||||
magento_repository: ${{ inputs.magento_repository }}
|
magento_repository: ${{ inputs.magento_repository }}
|
||||||
composer_auth: ${{ secrets.composer_auth }}
|
composer_auth: ${{ secrets.composer_auth }}
|
||||||
|
|
||||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
|
||||||
with:
|
|
||||||
composer_cache_key: ${{ inputs.composer_cache_key }}
|
|
||||||
|
|
||||||
- name: Add extension repository
|
- name: Add extension repository
|
||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
||||||
@@ -199,6 +215,15 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||||
|
|
||||||
|
- run: composer update --no-install
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
|
||||||
|
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||||
|
with:
|
||||||
|
composer_cache_key: ${{ inputs.composer_cache_key && format('{0} | {1}', inputs.composer_cache_key, matrix.magento) || matrix.magento }}
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
stamp: ${{ inputs.stamp }}
|
||||||
|
|
||||||
- name: Composer install
|
- name: Composer install
|
||||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
run: composer install
|
run: composer install
|
||||||
|
|||||||
Reference in New Issue
Block a user