mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-11 19:05:35 +08:00
Improve cache key generation
This commit is contained in:
9
.github/workflows/build-windows-x86_64.yml
vendored
9
.github/workflows/build-windows-x86_64.yml
vendored
@@ -52,19 +52,18 @@ jobs:
|
|||||||
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
||||||
run: composer update --no-dev --classmap-authoritative
|
run: composer update --no-dev --classmap-authoritative
|
||||||
|
|
||||||
- name: Generate hashed key for cache
|
- name: Generate hashed key for download cache
|
||||||
id: cache-key
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
INPUT_HASH=$(echo "${{ inputs.version }}-dependencies-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
|
INPUT_HASH=$(echo "${{ runner.os }}-${{ inputs.version }}-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
|
||||||
echo "::set-output name=hash::$INPUT_HASH"
|
echo "INPUT_HASH=${INPUT_HASH}" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
# Cache downloaded source
|
# Cache downloaded source
|
||||||
- id: cache-download
|
- id: cache-download
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: downloads
|
path: downloads
|
||||||
key: php-${{ steps.cache-key.outputs.hash }}
|
key: php-${{ env.INPUT_HASH }}
|
||||||
|
|
||||||
# With or without debug
|
# With or without debug
|
||||||
- if: inputs.debug == true
|
- if: inputs.debug == true
|
||||||
|
|||||||
Reference in New Issue
Block a user