mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-31 08:52:47 +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
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- name: Refresh dependencies
|
- name: Refresh dependencies
|
||||||
run: sudo apt update
|
run: sudo apt update
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
@ -32,9 +32,14 @@ def select_clang_version(formatters):
|
|||||||
|
|
||||||
## Entry Point ##
|
## Entry Point ##
|
||||||
if __name__ == "__main__":
|
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)
|
formatter = select_clang_version(CLANG_DIFF_FORMATTERS)
|
||||||
ret = subprocess.run(
|
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:
|
if ret.returncode:
|
||||||
print("Failed to run git diff: %s" % ret.stderr)
|
print("Failed to run git diff: %s" % ret.stderr)
|
||||||
|
Loading…
Reference in New Issue
Block a user