forked from kubeflow/pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubeflow#38 from rimolive/rmartine
chore: Add Commit Checker github action
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder | ||
|
||
WORKDIR /tmp | ||
RUN git clone https://github.com/openshift/build-machinery-go.git && \ | ||
cd /tmp/build-machinery-go/commitchecker && \ | ||
go build | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9 | ||
|
||
WORKDIR /bin | ||
|
||
COPY --from=builder /tmp/build-machinery-go/commitchecker/commitchecker /bin/commitchecker | ||
RUN microdnf install git && \ | ||
chmod +x /bin/commitchecker && \ | ||
mkdir -p /src/app-root | ||
|
||
WORKDIR /src/app-root | ||
ENTRYPOINT ["commitchecker"] | ||
|
||
VOLUME ["/src/app-root"] | ||
|
||
LABEL name="Commit Checker tool" \ | ||
summary="commitchecker validates a range of commits in a git repository and ensures they meet specific requirements: \ | ||
1. The author's email address does not start with "root@". \ | ||
2. The message starts with one of: \ | ||
i. UPSTREAM: <PR number|carry|drop>: description \ | ||
ii. UPSTREAM: revert: \ | ||
This is useful for repositories that are downstream forks of upstream repositories." |