-
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (54 loc) · 1.52 KB
/
generateJson.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Generate JSON
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- "LAST_UPDATED"
- "all-talks.json"
- "all-talks.js"
- "all-talks-node.js"
- "package.json"
jobs:
generate_json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Get yarn cache
id: yarn-cache
run: 'echo "::set-output name=dir::$(yarn cache dir)"'
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: "${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }}"
restore-keys: |
${{ runner.OS }}-yarn-
- name: Install dependencies
run: yarn
- name: Generate file json
run: yarn toJson
- name: Modify last update
run: |
d=`date '+%Y-%m-%dT%H:%M:%SZ'`
echo $d > LAST_UPDATED
- name: Commit files report
run: |
git config --local user.email "[email protected]"
git config --local user.name "mazipan"
git add -A
git commit -m "🐙 Auto commit by Github Actions"
- name: GitHub Push
uses: ad-m/[email protected]
with:
directory: "."
github_token: "${{ secrets.PERSONAL_TOKEN }}"
force: true