-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.15 KB
/
autobuild.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
on:
schedule:
- cron: 0 5 * * *
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
container: "python:3.11.4"
env:
CI_COMMIT_MESSAGE: Continuous Integration Autobuild
CI_COMMIT_AUTHOR: Continuous Integration
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
mkdir -p ~/.cache/pip
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Generate data
run: |
python3.11 generate.py
- name: GIT Commit Artifacts
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "username@users.noreply.github.com"
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" && git push || true