Skip to content

Commit 933fb52

Browse files
committed
ci: set dynamic PR title based on runtime ecodes changes
1 parent a843c87 commit 933fb52

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/generate-ecodes.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,19 @@ jobs:
3737
- name: Clean up temporary header
3838
run: rm input-event-codes.h
3939

40+
- name: Determine PR type
41+
id: pr-type
42+
run: |
43+
if git diff --quiet HEAD src/evdev/ecodes.lua; then
44+
echo "title=chore(ecodes): auto-regenerate ecodes files" >> $GITHUB_OUTPUT
45+
else
46+
echo "title=feat(ecodes): update event codes to latest Linux kernel" >> $GITHUB_OUTPUT
47+
fi
48+
4049
- name: Create Pull Request
4150
uses: peter-evans/create-pull-request@v8
4251
with:
43-
commit-message: "chore: auto-regenerate ecodes files"
44-
title: "chore: auto-regenerate ecodes files"
52+
commit-message: "${{ steps.pr-type.outputs.title }}"
53+
title: "${{ steps.pr-type.outputs.title }}"
4554
body: "Auto-generated changes by the `generate-ecodes` workflow."
4655
branch: "auto-generate-ecodes"

0 commit comments

Comments
 (0)