Skip to content

Commit

Permalink
Pre-commit update: Add ref for scheduled build and hint for maintaine…
Browse files Browse the repository at this point in the history
…rs (#32)

* Add ref_for_scheduled_build to pre-commit update

* Make the PR draft but add a hint for running the workflow manually.
  • Loading branch information
christophfroehlich authored Mar 12, 2024
1 parent 279065a commit 7c65592
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/reusable-update-pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ name: Update pre-commit

on:
workflow_call:
inputs:
ref_for_scheduled_build:
description: 'Reference on which the repo should be checkout for scheduled build. Usually is this name of a branch or a tag.'
default: ''
required: false
type: string

jobs:
auto_update_and_create_pr:
Expand All @@ -12,6 +18,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref_for_scheduled_build }}

- name: Install pre-commit
run: |
Expand Down Expand Up @@ -42,8 +50,9 @@ jobs:
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: auto-update
commit-message: Auto-update with pre-commit
branch: auto-update-${{ github.event.inputs.ref_for_scheduled_build }}
commit-message: Bump version of pre-commit hooks
title: Bump version of pre-commit hooks
body: This pull request contains auto-updated files of pre-commit config.
body: This pull request contains auto-updated files of the pre-commit config. @ros-controls/ros2-maintainers please run the pre-commit workflow manually on the branch `auto-update-${{ github.event.inputs.ref_for_scheduled_build }}` before merging.
delete-branch: true
draft: true

0 comments on commit 7c65592

Please sign in to comment.