Updated cached artifacts.
This commit is contained in:
@@ -64,51 +64,51 @@ outputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Get full cache key and build command."
|
||||
id: command
|
||||
run: |
|
||||
# Get the full cache id.
|
||||
echo "key=${{ inputs.cachePrefix }}-${{ github.ref_name }}-${{ inputs.cacheSuffix }}" >> "$GITHUB_OUTPUT"
|
||||
# Get the build command.
|
||||
COMMAND="${{ inputs.command }}"
|
||||
if [[ -n "${{ inputs.executeMethod }}" ]]; then
|
||||
COMMAND="$COMMAND -executeMethod ${{ inputs.executeMethod }}"
|
||||
fi
|
||||
echo "command=$COMMAND" >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
- name: "Check if cache exists."
|
||||
id: check-cache
|
||||
uses: https://github.com/actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ inputs.cachePath }}
|
||||
key: ${{ steps.command.outputs.key }}
|
||||
lookup-only: true
|
||||
- name: "Restore Library from Cache."
|
||||
if: ${{ ( inputs.buildOnCacheHit == 'true' || steps.check-cache.outputs.cache-hit != 'true' ) }}
|
||||
uses: https://github.com/actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ inputs.cachePath }}
|
||||
key: ${{ steps.command.outputs.key }}
|
||||
restore-keys: |
|
||||
${{ inputs.cachePrefix }}-${{ github.ref_name }}
|
||||
${{ inputs.cachePrefix }}-${{ inputs.releaseBranch }}
|
||||
${{ inputs.cachePrefix }}
|
||||
- name: "Build project."
|
||||
if: ${{ inputs.buildOnCacheHit == 'true' || steps.check-cache.outputs.cache-hit != 'true' }}
|
||||
uses: act/unity/unity-project@master
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
serial: ${{ inputs.serial }}
|
||||
email: ${{ inputs.email }}
|
||||
password: ${{ inputs.password }}
|
||||
sshPublicKey: ${{ inputs.sshPublicKey }}
|
||||
sshPrivateKey: ${{ inputs.sshPrivateKey }}
|
||||
command: ${{ steps.command.outputs.command }}
|
||||
noGraphics: ${{ inputs.noGraphics }}
|
||||
unityBuilder: ${{ inputs.unityBuilder }}
|
||||
- name: "Upload Library to Cache."
|
||||
if: ${{ steps.check-cache.outputs.cache-hit != 'true' }}
|
||||
uses: https://github.com/actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ inputs.cachePath }}
|
||||
key: ${{ steps.command.outputs.key }}
|
||||
- name: "Get full cache key and build command."
|
||||
id: command
|
||||
run: |
|
||||
# Get the full cache id.
|
||||
echo "key=${{ inputs.cachePrefix }}-${{ github.ref_name }}-${{ inputs.cacheSuffix }}" >> "$GITHUB_OUTPUT"
|
||||
# Get the build command.
|
||||
COMMAND="${{ inputs.command }}"
|
||||
if [[ -n "${{ inputs.executeMethod }}" ]]; then
|
||||
COMMAND="$COMMAND -executeMethod ${{ inputs.executeMethod }}"
|
||||
fi
|
||||
echo "command=$COMMAND" >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
- name: "Check if cache exists."
|
||||
id: check-cache
|
||||
uses: https://github.com/actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ inputs.cachePath }}
|
||||
key: ${{ steps.command.outputs.key }}
|
||||
lookup-only: true
|
||||
- name: "Restore Library from Cache."
|
||||
if: ${{ ( inputs.buildOnCacheHit == 'true' || steps.check-cache.outputs.cache-hit != 'true' ) }}
|
||||
uses: https://github.com/actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ inputs.cachePath }}
|
||||
key: ${{ steps.command.outputs.key }}
|
||||
restore-keys: |
|
||||
${{ inputs.cachePrefix }}-${{ github.ref_name }}
|
||||
${{ inputs.cachePrefix }}-${{ inputs.releaseBranch }}
|
||||
${{ inputs.cachePrefix }}
|
||||
- name: "Build project."
|
||||
if: ${{ inputs.buildOnCacheHit == 'true' || steps.check-cache.outputs.cache-hit != 'true' }}
|
||||
uses: act/unity/unity-project@master
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
serial: ${{ inputs.serial }}
|
||||
email: ${{ inputs.email }}
|
||||
password: ${{ inputs.password }}
|
||||
sshPublicKey: ${{ inputs.sshPublicKey }}
|
||||
sshPrivateKey: ${{ inputs.sshPrivateKey }}
|
||||
command: ${{ steps.command.outputs.command }}
|
||||
noGraphics: ${{ inputs.noGraphics }}
|
||||
unityBuilder: ${{ inputs.unityBuilder }}
|
||||
- name: "Upload Library to Cache."
|
||||
if: ${{ steps.check-cache.outputs.cache-hit != 'true' }}
|
||||
uses: https://github.com/actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ inputs.cachePath }}
|
||||
key: ${{ steps.command.outputs.key }}
|
||||
|
||||
Reference in New Issue
Block a user