Skip to content

Commit 2e219a3

Browse files
[github/actions] Update workflows to install necessary packages for
pre-commit.
1 parent 01ee32a commit 2e219a3

File tree

3 files changed

+35
-11
lines changed

3 files changed

+35
-11
lines changed

.github/workflows/ci-format.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This is a format job. Pre-commit has a first-party GitHub action, so we use
2+
# that: https://github.com/pre-commit/action
3+
4+
name: Format
5+
6+
on:
7+
workflow_dispatch:
8+
pull_request:
9+
10+
jobs:
11+
pre-commit:
12+
name: Format
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: 3.10.6
19+
- name: Install system hooks
20+
run: sudo apt install -qq cppcheck ament-cmake-uncrustify ament-cmake-pep257
21+
- uses: pre-commit/[email protected]
22+
with:
23+
extra_args: --all-files --hook-stage manual

.github/workflows/ci-pre-commit.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Auto Update pre-commit
2+
# Update pre-commit config and create PR if changes are detected
3+
# author: Christoph Fröhlich <[email protected]>
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 0 1 * *' # Runs at 00:00, on day 1 of the month
9+
10+
jobs:
11+
auto_update_and_create_pr:
12+
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-update-pre-commit.yml@master

0 commit comments

Comments
 (0)