File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1010
1111## New Features
1212
13- <!-- Here goes the main new features and examples or instructions on how to use them -->
13+ * cookiecutter: Add linting to the CI with ` protolint ` for API projects.
1414
1515## Bug Fixes
1616
Original file line number Diff line number Diff line change 2323 # but sadly `env` can't be used either in `runs-on`.
2424
2525jobs :
26+ {% if cookiecutter.type == "api" -%}
27+ protolint :
28+ runs-on : ubuntu-20.04
29+
30+ steps :
31+ - name : Fetch sources
32+ uses : actions/checkout@v3
33+ with :
34+ submodules : true
35+
36+ - name : Run protolint
37+ # Only use hashes here, as we are passing the github token, we want to
38+ # make sure updates are done conciously to avoid security issues if the
39+ # action repo gets hacked
40+ uses : yoheimuta/action-protolint@e94cc01b1ad085ed9427098442f66f2519c723eb # v1.0.0
41+ with :
42+ fail_on_error : true
43+ filter_mode : nofilter
44+ github_token : {{'${{ secrets.github_token }}'}}
45+ protolint_flags : proto/
46+ protolint_version : " 0.45.0"
47+ reporter : github-check
48+
49+ {% endif -%}
2650 nox :
2751 name : Test with nox
2852 strategy :
@@ -121,7 +145,7 @@ jobs:
121145
122146 publish-docs :
123147 name : Publish documentation website to GitHub pages
124- needs : ["nox", "build"]
148+ needs : ["nox", "build"{{', "protolint"' if cookiecutter.type == "api"}} ]
125149 if : github.event_name == 'push'
126150 runs-on : ubuntu-20.04
127151 permissions :
You can’t perform that action at this time.
0 commit comments