Skip to content

Commit 9f8adcc

Browse files
committed
ci: add Github Action to automatically update compatibility table
1 parent 865cf5e commit 9f8adcc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/compatibility.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ jobs:
2222
uses: actions/checkout@v4
2323
with:
2424
path: dependency
25+
fetch-depth: 0
26+
filter: tree:0
2527

2628
- name: Setup Python
2729
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.13'
2832

2933
- run: python ./source/compatibility-table.py --source-version ${{ needs.versioning.outputs.next-version }} -d ./dependency -r ./source/README.md
3034

compatibility-table.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
parser.add_argument('-s', '--source-repo',
1717
help="Source git repository, probably the repository of the Readme file (mutually exclusive with --source-version)")
1818
parser.add_argument('--source-version', help="Source version (mutually exclusive with -s)")
19-
parser.add_argument('-r', '--readme', nargs=1, help="Readme file that needs to be updated", default="README.md")
19+
parser.add_argument('-r', '--readme', help="Readme file that needs to be updated", default="README.md")
2020
parser.add_argument('-d', '--dependency-repo',
2121
help="Dependency git repository: the one's whose version you want to know (mutually exclusive with --dependency-version)")
2222
parser.add_argument('--dependency-version', help="Dependency version (mutually exclusive with -d)")
@@ -50,6 +50,7 @@ def get_version_from_git_repo(path: str) -> str:
5050
if p.returncode != 0 or not out[0]:
5151
print('Getting latest tag from git repo "{}" failed with exit code {}:'.format(path, p.returncode))
5252
print(out)
53+
sys.exit(1)
5354

5455
out = out[0].strip()
5556
return out

0 commit comments

Comments
 (0)