Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/actions/verify-boilerplate/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Verify Boilerplate Copyright Headers"
description: >-
Runs kubeflow/testing's hack/boilerplate/boilerplate.py against the repo's

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a spell checker.

Repo -> repository

changed files so callers never need to vendor a divergent copy of the script.
inputs:
base-ref:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base-reference

description: >-
Base ref to diff against for new-file detection. Defaults to the PR base

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ref -> reference

branch (github.base_ref).
required: false
default: ${{ github.base_ref }}
boilerplate-dir:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dir -> directory

description: >-
Directory containing the boilerplate template files. Defaults to the
vendored templates shipped with this action.
required: false
default: ${{ github.action_path }}/../../../hack/boilerplate
python-version:
description: Python version used to run the checker.
required: false
default: "3.12"
runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: Run boilerplate verification
shell: bash
run: |
python "${{ github.action_path }}/../../../hack/boilerplate/boilerplate.py" --boilerplate-dir "${{ inputs.boilerplate-dir }}" --base-ref "${{ inputs.base-ref }}"