Browse Source

Add runner rule (#6)

* Add runner rule

* Run black against lint.py
pull/8/head
Vince Grassia 4 years ago committed by GitHub
parent
commit
9f2b33f2af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      lint-workflow/lint.py

7
lint-workflow/lint.py

@ -25,6 +25,13 @@ def lint(filename): @@ -25,6 +25,13 @@ def lint(filename):
for job_key in jobs:
job = jobs[job_key]
# Make sure runner is using pinned version.
runner = job["runs-on"]
if runner.split("-")[1] == "latest":
findings.append(
f"- Runner version is set to '{runner}', but needs to be pinned to a version."
)
# Check for 'name' key for job.
if "name" not in job:
findings.append(f"- Name key missing for job key '{job_key}'.")

Loading…
Cancel
Save