-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (37 loc) · 1.13 KB
/
Copy pathtrain.yml
File metadata and controls
44 lines (37 loc) · 1.13 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
name: Train Model
on:
workflow_dispatch:
workflow_run:
workflows: ["Validate Data"]
types:
- completed
jobs:
run_script:
runs-on: macos-latest # Use macOS runner
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: update-data
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r workflow_scripts/tf_requirements.txt
echo "TF_USE_LEGACY_KERAS=True" >> $GITHUB_ENV
- name: "Start Train"
run: |
python workflow_scripts/get_rec_model.py
- name: Commit and push changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
DATE=$(date +"%Y-%m-%d")
git add .
git commit -m "Update Recommender Model by GitHub Actions on $DATE"
git push
env:
GITHUB_TOKEN: ${{ secrets.UPDATE_SECRET }}