Skip to content

Commit 9174c20

Browse files
committed
Add workflow trigger to test with the lockfile
1 parent 90d6cdf commit 9174c20

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/main.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
on:
22
push:
33
branches:
4-
- '*'
4+
- 'main'
5+
- 'latest-release'
56
pull_request:
67
merge_group:
8+
workflow_dispatch:
9+
inputs:
10+
release:
11+
description: Test with the release lock
12+
type: boolean
13+
default: false
14+
15+
env:
16+
lock_pdm: ${{ ! (github.ref_name == 'refs/heads/latest-release' || inputs.release) }}
717

818
name: CI
19+
run-name: ${{ inputs.release && 'Release' || 'CI'}}
920
jobs:
1021

1122
submit:
@@ -29,6 +40,7 @@ jobs:
2940
cache: true
3041

3142
- name: Relock PDM
43+
if: env.lock_pdm
3244
run: pdm lock -d
3345

3446
- name: Install dependencies
@@ -62,6 +74,7 @@ jobs:
6274
cache: true
6375

6476
- name: Relock PDM
77+
if: env.lock_pdm
6578
run: |
6679
pdm lock -d
6780

0 commit comments

Comments
 (0)