-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (39 loc) · 1.18 KB
/
jar_sizes.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
name: Get jar sizes
on:
push:
branches:
- main
paths:
- src/main/resources/availableDLVersions.json
- .github/workflows/jar_sizes.yml
- .github/get_jars_sizes.py
workflow_dispatch:
env:
FPATH: "src/main/resources/jar_sizes.json"
jobs:
build-and-run:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dep
run: python -m pip install requests
- name: Get file sizes and generate JSON
run: python .github/get_jars_sizes.py ${{ env.FPATH }}
- name: Commit and push changes
run: |
# Configure Git
git config user.name "github-actions"
git config user.email "[email protected]"
# Only commit/push if there are changes
if [ -n "$(git status --porcelain)" ]; then
git add ${{ env.FPATH }}
git commit -m "Update file sizes"
git push
else
echo "No changes to commit."
fi