Skip to content

Commit

Permalink
[github/actions] Update workflows to install necessary packages for
Browse files Browse the repository at this point in the history
pre-commit.
  • Loading branch information
olivier-stasse committed Jul 22, 2024
1 parent 01ee32a commit 2e219a3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This is a format job. Pre-commit has a first-party GitHub action, so we use
# that: https://github.com/pre-commit/action

name: Format

on:
workflow_dispatch:
pull_request:

jobs:
pre-commit:
name: Format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.10.6
- name: Install system hooks
run: sudo apt install -qq cppcheck ament-cmake-uncrustify ament-cmake-pep257
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --hook-stage manual
11 changes: 0 additions & 11 deletions .github/workflows/ci-pre-commit.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/update-pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Auto Update pre-commit
# Update pre-commit config and create PR if changes are detected
# author: Christoph Fröhlich <[email protected]>

on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Runs at 00:00, on day 1 of the month

jobs:
auto_update_and_create_pr:
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-update-pre-commit.yml@master

0 comments on commit 2e219a3

Please sign in to comment.