-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 1.13 KB
/
main.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
name: nasa-apod-automation
on:
schedule:
- cron: '5 5 * * *' # runs at 9:00 UTC/4:00 AM EST everyday --> Change to 5 PM UTC = 12 AM EST
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner
- name: setup python
uses: actions/setup-python@v2
with:
check-latest: true # install the latest python version
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute py script # run apod.py to get the latest data
run: python apod.py
- name: commit files
run: |
git add -A
git config --local user.email "action@github.com"
git config --local user.name "NASA APOD Workflow"
git commit -m "Updating NASA Astronomy Picture of the Day"
- name: push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main