-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.09 KB
/
update-mc-versions.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
name: Update MC version data
on:
push:
branches:
- 'master'
paths:
- '.github/workflows/update-mc-versions.yml'
- 'update_versions.py'
schedule:
- cron: '30 * * * *'
workflow_dispatch:
jobs:
update_mc_versions:
name: "Update MC versions"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version-file: '.python-version' # Read python version from .python-version
cache: 'poetry'
- run: poetry install
- run: poetry run python update_versions.py
- name: Check for changes
run: git diff --quiet version/ || echo 'CHANGED=true' >> "$GITHUB_ENV"
- name: Push changes
if: ${{ env.CHANGED == 'true' }}
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add ./version/**.json
git commit -m "Update MC versions ($(date --iso-8601))"
git push