mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-25 09:22:33 +00:00
ci: release-emu.yml: manual dispatch inputs
This commit is contained in:
parent
1f697ace50
commit
6da8e04660
28
.github/workflows/release-emu.yml
vendored
28
.github/workflows/release-emu.yml
vendored
@ -6,6 +6,23 @@ on:
|
|||||||
- 'core/v*'
|
- 'core/v*'
|
||||||
- 'legacy/v*'
|
- 'legacy/v*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
project:
|
||||||
|
type: choice
|
||||||
|
required: true
|
||||||
|
default: core
|
||||||
|
options:
|
||||||
|
- core
|
||||||
|
- legacy
|
||||||
|
version:
|
||||||
|
description: version string
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
models_json:
|
||||||
|
description: models as a JSON list
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: "[\"T2B1\",\"T2T1\",\"T3B1\",\"T3T1\"]"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write # for fetching the OIDC token
|
id-token: write # for fetching the OIDC token
|
||||||
@ -29,13 +46,16 @@ jobs:
|
|||||||
elif [[ $GITHUB_REF == refs/tags/legacy/* ]]; then
|
elif [[ $GITHUB_REF == refs/tags/legacy/* ]]; then
|
||||||
VERSION=${GITHUB_REF#refs/tags/legacy/v}
|
VERSION=${GITHUB_REF#refs/tags/legacy/v}
|
||||||
MODELS=$(jq -cr --arg version "$VERSION" '.firmware[$version]' ./common/releases.json)
|
MODELS=$(jq -cr --arg version "$VERSION" '.firmware[$version]' ./common/releases.json)
|
||||||
|
else
|
||||||
|
VERSION="${{ inputs.version }}"
|
||||||
|
MODELS='${{ inputs.models_json }}'
|
||||||
fi
|
fi
|
||||||
echo "models=$MODELS" >> $GITHUB_OUTPUT
|
echo "models=$MODELS" >> $GITHUB_OUTPUT
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
cat $GITHUB_OUTPUT
|
cat $GITHUB_OUTPUT
|
||||||
|
|
||||||
core_emu:
|
core_emu:
|
||||||
if: startsWith(github.ref, 'refs/tags/core/v')
|
if: startsWith(github.ref, 'refs/tags/core/v') || inputs.project == 'core'
|
||||||
name: Build emu
|
name: Build emu
|
||||||
needs: get_models
|
needs: get_models
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -85,7 +105,7 @@ jobs:
|
|||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
core_emu_arm:
|
core_emu_arm:
|
||||||
if: startsWith(github.ref, 'refs/tags/core/v')
|
if: startsWith(github.ref, 'refs/tags/core/v') || inputs.project == 'core'
|
||||||
name: Build core emu arm
|
name: Build core emu arm
|
||||||
needs: get_models
|
needs: get_models
|
||||||
runs-on: ubuntu-latest-arm64
|
runs-on: ubuntu-latest-arm64
|
||||||
@ -135,7 +155,7 @@ jobs:
|
|||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
legacy_emu:
|
legacy_emu:
|
||||||
if: startsWith(github.ref, 'refs/tags/legacy/v')
|
if: startsWith(github.ref, 'refs/tags/legacy/v') || inputs.project == 'legacy'
|
||||||
name: Build legacy emu
|
name: Build legacy emu
|
||||||
needs: get_models
|
needs: get_models
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -171,7 +191,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
legacy_emu_arm:
|
legacy_emu_arm:
|
||||||
if: startsWith(github.ref, 'refs/tags/legacy/v')
|
if: startsWith(github.ref, 'refs/tags/legacy/v') || inputs.project == 'legacy'
|
||||||
name: Build legacy emu arm
|
name: Build legacy emu arm
|
||||||
needs: get_models
|
needs: get_models
|
||||||
runs-on: ubuntu-latest-arm64
|
runs-on: ubuntu-latest-arm64
|
||||||
|
Loading…
Reference in New Issue
Block a user