generated from occ-data/generic-template
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.18 KB
/
updated_counts.yaml
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
# This workflow automatically updates the counts daily.
# It also runs on push events to make sure the files can still be read and executed,
# but the counts updates are only pushed when running on `master` branch upon merging
# a PR or during a scheduled/manual run.
on:
push:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
name: Update counts
jobs:
run:
name: Update counts
if: ${{ !contains(github.event.commits[0].message, '[skip-counts-update]') }}
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@master
- name: install python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: install requirements
run: |
python -m pip install -U pip
pip install -U -r update_counts/requirements.txt
- name: run update script
run: |
python update_counts/update_counts.py
- name: push to master
if: github.ref == 'refs/heads/master'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automated Stats Update [skip-counts-update]
branch: master
commit_options: '-a'