-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.67 KB
/
action.yml
File metadata and controls
60 lines (51 loc) · 1.67 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Automatic Event Date Updater
on:
schedule:
- cron: "0 0 1 1 *"
workflow_dispatch:
inputs:
branch:
description: "Run tests on branch"
required: true
default: "main"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Debug Message
run: echo "Workflow triggered at $(date)"
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner.
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8 #install the python needed
- name: Retrieve and write service account JSON
env:
SERVICE_ACCOUNT_JSON: ${{ secrets.SERVICE_ACCOUNT_JSON }}
run: |
echo "${SERVICE_ACCOUNT_JSON}" > service_account.json
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install gspread
pip install pandas
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Python Script
run: |
python_script="scripts/script_2.py"
python "$python_script"
- name: Configure Git
run: |
git config --global user.email "jlang61@ucsb.edu"
git config --global user.name "Justin Lang"
- name: Add changes
run: git add data/eventData.ts
- name: Commit changes
run: |
git commit -m "Update eventData.ts" || echo "No changes to commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}