forked from emartinez-usgs/code-json-generator
-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (35 loc) · 1012 Bytes
/
daily.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
name: "Daily code.json update"
on:
schedule:
# Run at 6:15am UTC every day
- cron: '15 6 * * *'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: "ubuntu-latest"
steps:
- name: Check out code
uses: actions/checkout@v2
run:
name: Run
runs-on: "ubuntu-latest"
needs: build
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run code json generator
run: |
./bin/run-codejsongenerator.sh && echo "Run code json generator"
- name: Commit & Push
if: ${{ success() }}
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch --depth=1 origin output
git worktree add -b output ../output origin/output
mv code.json ../output/code.json
cd ../output/
git add code.json
git commit -m "Automated workflow from GitHub Actions"
git push origin output