mirror of
https://github.com/RetroDECK/components-template.git
synced 2025-01-19 10:35:37 +00:00
Added runtime fetcher from cooker
This commit is contained in:
parent
7af698ae3b
commit
6fabc5c0bb
24
.github/workflows/build_artifacts.yml
vendored
24
.github/workflows/build_artifacts.yml
vendored
|
@ -20,6 +20,10 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: "ubuntu-latest"
|
default: "ubuntu-latest"
|
||||||
|
FORCED_RUNTIME:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: "false"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DATE: ${{ github.run_id }}
|
DATE: ${{ github.run_id }}
|
||||||
|
@ -55,6 +59,26 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: "Fetch and replace runtime values"
|
||||||
|
if: ${{ inputs.FORCED_RUNTIME == 'true' }}
|
||||||
|
run: |
|
||||||
|
MANIFEST_CONTENT=$(curl -s https://raw.githubusercontent.com/RetroDECK/RetroDECK/cooker/net.retrodeck.retrodeck.yml)
|
||||||
|
RUNTIME=$(echo "$MANIFEST_CONTENT" | yq e '.runtime' -)
|
||||||
|
RUNTIME_VERSION=$(echo "$MANIFEST_CONTENT" | yq e '.runtime-version' -)
|
||||||
|
SDK=$(echo "$MANIFEST_CONTENT" | yq e '.sdk' -)
|
||||||
|
|
||||||
|
for file in ./*.*.*.json ./*.*.*.yml ./*.*.*.yaml; do
|
||||||
|
if [[ -f "$file" ]]; then
|
||||||
|
if [[ "$file" == *.json ]]; then
|
||||||
|
jq ".runtime = \"$RUNTIME\" | .\"runtime-version\" = \"$RUNTIME_VERSION\" | .sdk = \"$SDK\"" "$file" > tmp.$$.json && mv tmp.$$.json "$file"
|
||||||
|
else
|
||||||
|
yq e -i ".runtime = \"$RUNTIME\"" "$file"
|
||||||
|
yq e -i ".runtime-version = \"$RUNTIME_VERSION\"" "$file"
|
||||||
|
yq e -i ".sdk = \"$SDK\"" "$file"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
- name: "[DEBUG] Outputting manifest"
|
- name: "[DEBUG] Outputting manifest"
|
||||||
if: ${{ inputs.DYNAMIC_MANIFEST == 'true' }}
|
if: ${{ inputs.DYNAMIC_MANIFEST == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in a new issue