forked from mlcommons/power-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (52 loc) · 1.45 KB
/
update_checksums.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Update checksums
on:
push:
branches:
- master
paths:
- 'compliance/**'
- '.github/workflows/update_checksums.yml'
- '__init__.py'
- 'client.py'
- 'lib/__init__.py'
- 'lib/client.py'
- 'lib/common.py'
- 'lib/external/__init__.py'
- 'lib/external/ntplib.py'
- 'lib/server.py'
- 'lib/source_hashes.py'
- 'lib/summary.py'
- 'lib/time_sync.py'
- 'server.py'
- 'tests/unit/__init__.py'
- 'tests/unit/test_server.py'
- 'tests/unit/test_source_hashes.py'
jobs:
update_checksums:
name: Check Python
runs-on: "${{ matrix.on }}"
strategy:
fail-fast: false
matrix:
python-version: [3.9]
on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update the source checksums
run: |
python3 compliance/helper/update_sources_checksum.py
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add compliance/sources_checksums.json
HAS_CHANGES=$(git diff --staged --name-only)
if [ ${#HAS_CHANGES} -gt 0 ]; then
# Commit changes
git commit -am '[Automated Commit] Update checksums'
git push
fi