Skip to content

Commit 0e7c2df

Browse files
committed
Allow manual triggering with a specific environment
1 parent 9862f08 commit 0e7c2df

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/main.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@ on:
66
merge_group:
77
schedule:
88
- cron: '0 0 * * *' # Every day at midnight UTC
9-
9+
# allow manual triggering with a given environment
10+
workflow_dispatch:
11+
inputs:
12+
environment:
13+
required: true
14+
type: environment
15+
env:
16+
enviironment: ${{ github.event_name == 'workflow_dispatch' && inputs.environment || 'Staging' }}
1017
name: CI
1118
jobs:
1219

1320
test:
21+
environment:
22+
name: ${{ env.environment }}
1423
runs-on: ubuntu-latest
1524
steps:
1625
- name: Check out source code
@@ -34,6 +43,8 @@ jobs:
3443
run: pdm run test-docs
3544

3645
license:
46+
environment:
47+
name: ${{ env.environment }}
3748
runs-on: ubuntu-latest
3849
steps:
3950
- name: Check out source code
@@ -44,6 +55,8 @@ jobs:
4455
run: ./tools/license_check.sh
4556

4657
test-submit:
58+
environment:
59+
name: ${{ env.environment }}
4760
uses: ./.github/workflows/test-examples.yml
4861
with:
4962
CHIPFLOW_API_ORIGIN: ${{ vars.CHIPFLOW_API_ORIGIN }}

.github/workflows/test-examples.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ on:
55
secrets:
66
CHIPFLOW_API_KEY:
77
required: true
8+
type: string
89
inputs:
910
CHIPFLOW_API_ORIGIN:
1011
required: true
12+
type: string
1113
CHIPFLOW_BACKEND_VERSION:
1214
required: true
15+
type: string
1316

1417

1518
jobs:

0 commit comments

Comments
 (0)