-
Notifications
You must be signed in to change notification settings - Fork 120
35 lines (28 loc) · 879 Bytes
/
updater.yml
File metadata and controls
35 lines (28 loc) · 879 Bytes
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
name: Python script to update documentations and header details on merge
on:
push:
branches:
- __never__
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install -r requirements.txt || true # skip if no file
- name: Run script
run: python auxiliary/updater.py
- name: Commit and push changes
if: success()
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git diff-index --quiet HEAD || git commit -m "Automated update after merge"
git push