mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-28 18:57:37 +00:00
trivial: set the reference commit to run style check against on CI
This commit is contained in:
parent
987e7d2929
commit
01f79c0339
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -10,6 +10,8 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Refresh dependencies
|
||||
run: sudo apt update
|
||||
- name: Install dependencies
|
||||
|
@ -32,9 +32,14 @@ def select_clang_version(formatters):
|
||||
|
||||
## Entry Point ##
|
||||
if __name__ == "__main__":
|
||||
base = os.getenv("GITHUB_BASE_REF")
|
||||
if base:
|
||||
base = "origin/%s" % base
|
||||
else:
|
||||
base = "HEAD"
|
||||
formatter = select_clang_version(CLANG_DIFF_FORMATTERS)
|
||||
ret = subprocess.run(
|
||||
["git", "diff", "-U0", "HEAD"], capture_output=True, check=True, text=True
|
||||
["git", "diff", "-U0", base], capture_output=True, check=True, text=True
|
||||
)
|
||||
if ret.returncode:
|
||||
print("Failed to run git diff: %s" % ret.stderr)
|
||||
|
Loading…
Reference in New Issue
Block a user