Skip to content

Commit 0180905

Browse files
committed
ci(triggers): Improve workflow triggering and bump versions
1 parent d47771f commit 0180905

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.github/workflows/pre-commit.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches:
77
- master
88
pull_request:
9-
types: [opened, reopened, synchronize, labeled, unlabeled]
9+
types: [opened, reopened, synchronize, labeled]
1010

1111
concurrency:
1212
group: pre-commit-${{github.event.pull_request.number || github.ref}}
@@ -15,8 +15,10 @@ concurrency:
1515
jobs:
1616
lint:
1717
if: |
18+
github.event_name != 'pull_request' ||
1819
contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge') ||
19-
github.event_name != 'pull_request'
20+
contains(github.event.pull_request.labels.*.name, 'Re-trigger Pre-commit Hooks')
21+
2022
name: Check if fixes are needed
2123
runs-on: ubuntu-latest
2224
steps:
@@ -25,6 +27,12 @@ jobs:
2527
with:
2628
fetch-depth: 2
2729

30+
- name: Remove Label
31+
if: contains(github.event.pull_request.labels.*.name, 'Re-trigger Pre-commit Hooks')
32+
run: gh pr edit ${{ github.event.number }} --remove-label 'Re-trigger Pre-commit Hooks'
33+
env:
34+
GH_TOKEN: ${{ github.token }}
35+
2836
- name: Set up Python 3
2937
uses: actions/setup-python@v5
3038
with:
@@ -65,7 +73,7 @@ jobs:
6573
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
6674

6775
- name: Push changes using pre-commit-ci-lite
68-
uses: pre-commit-ci/lite-action@v1.0.2
76+
uses: pre-commit-ci/lite-action@v1.1.0
6977
# Only push changes in PRs
7078
if: ${{ always() && github.event_name == 'pull_request' }}
7179
with:

.github/workflows/push.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches:
77
- master
8-
- release/v2.x
8+
- release/*
99
pull_request:
1010
paths:
1111
- 'cores/**'
@@ -54,6 +54,7 @@ jobs:
5454
gen-chunks:
5555
name: Generate chunks
5656
runs-on: ubuntu-latest
57+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'release/')) }}
5758
outputs:
5859
build_all: ${{ steps.set-chunks.outputs.build_all }}
5960
build_libraries: ${{ steps.set-chunks.outputs.build_libraries }}

tests/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cryptography==43.0.1
22
--only-binary cryptography
33
pytest-cov==5.0.0
4-
pytest-embedded-serial-esp==1.11.6
5-
pytest-embedded-arduino==1.11.6
6-
pytest-embedded-wokwi==1.11.6
7-
pytest-embedded-qemu==1.11.6
4+
pytest-embedded-serial-esp==1.11.8
5+
pytest-embedded-arduino==1.11.8
6+
pytest-embedded-wokwi==1.11.8
7+
pytest-embedded-qemu==1.11.8

tools/pre-commit/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pre-commit==3.7.1
1+
pre-commit==4.0.1
22
docutils==0.16

0 commit comments

Comments
 (0)