-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.22 KB
/
run.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
name: Run Program
on:
push:
branches:
- main
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
run_program:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/[email protected]
with:
# Version range or exact version of Python or PyPy to use, using SemVer's version range syntax. Reads from .python-version if unset.
python-version: 3.12.6
# Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry.
cache: pipenv
- name: Install Dependencies
run: |
pip3 install --upgrade pipenv
pipenv install
- name: Run Python Program
run: |
pipenv run ./main.py
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Add changes"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}