File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 pull_request :
88 branches :
99 - main
10+ workflow_dispatch :
11+ inputs :
12+ os :
13+ description : ' Operating System(s) to test on'
14+ required : false
15+ type : choice
16+ default : ' all'
17+ options :
18+ - ' all'
19+ - ' ubuntu-latest'
20+ - ' macos-latest'
21+ - ' windows-latest'
22+ typst_version :
23+ description : ' Typst version to test (leave empty for all versions)'
24+ required : false
25+ type : string
1026
1127permissions :
1228 contents : read
5268 # Parse the TYPST_VERSIONS array
5369 ALL_VERSIONS='${{ env.TYPST_VERSIONS }}'
5470
71+ # Handle manual workflow_dispatch
72+ if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
73+ echo "Manual workflow dispatch detected"
74+
75+ # Handle OS selection
76+ if [ "${{ github.event.inputs.os }}" == "all" ] || [ -z "${{ github.event.inputs.os }}" ]; then
77+ echo 'os-matrix=["ubuntu-latest", "macos-latest", "windows-latest"]' >> $GITHUB_OUTPUT
78+ else
79+ echo 'os-matrix=["${{ github.event.inputs.os }}"]' >> $GITHUB_OUTPUT
80+ fi
81+
82+ # Handle typst version selection
83+ if [ -n "${{ github.event.inputs.typst_version }}" ]; then
84+ echo 'typst-version-matrix=["${{ github.event.inputs.typst_version }}"]' >> $GITHUB_OUTPUT
85+ else
86+ # Use all versions from TYPST_VERSIONS
87+ echo "typst-version-matrix=$ALL_VERSIONS" >> $GITHUB_OUTPUT
88+ fi
89+
90+ exit 0
91+ fi
92+
5593 if [ "${{ steps.filter.outputs.workflow }}" == "true" ]; then
5694 # Check if this is a PR or push event
5795 if [ "${{ github.event_name }}" == "pull_request" ]; then
You can’t perform that action at this time.
0 commit comments