-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workflows: add commitlint workflow #92
Conversation
d581a94
to
8f877ad
Compare
strange, I don't see why the new workflow file does not trigger a check run ... 🤷♂️ |
component definitions are basically taken from the existing git log. Signed-off-by: Michael Adam <obnox@samba.org>
8f877ad
to
fec5276
Compare
now it starts and even succeeds! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type-enum looks ok, but see other comments in this PR
@@ -0,0 +1,31 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recommended method is to use javascript config file. See: https://commitlint.js.org/#/reference-configuration
"workflows", | ||
"kubernetes", | ||
"hack", | ||
"Makefile" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use makefile:
(lowercase) labels so far. Better keep it that way.
@@ -0,0 +1,26 @@ | |||
name: Commitlint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike rook
, in samba-operator
we use single workflow-action yaml, which allows us to see all jobs at once (as DAG) and halt workflow as soon a a job fails. Better have this section part of main.yaml
with proper needs
.
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-18.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ubuntu-latest
lint: | ||
runs-on: ubuntu-18.04 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this env? I think its redundant and confusing.
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use latest actions/checkout@v3
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this? AFAIK, it is not needed in this case.
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v2.0.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use latest version: wagoid/commitlint-github-action@v5
converted to draft becaus @phlogistonjohn suggested we solve the corresponding effort for samba-operator first : samba-in-kubernetes/samba-operator#272 or samba-in-kubernetes/samba-operator#274 |
Support for gitlint is already merged via #124. |
component definitions are basically taken from the existing git log.
Signed-off-by: Michael Adam obnox@redhat.com