-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.14 KB
/
fetch-data.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: Fetch YouTube Data
on:
repository_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
data:
name: Get latest video data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 15.x
uses: actions/setup-node@v2
with:
node-version: '15'
- name: Use npm 7
run: |
npm install -g [email protected]
- name: Install
run: |
npm install
git checkout package-lock.json
- name: Fetch new data
run: |
npm run data -- ${{ github.event.client_payload.artist }}
npm run data:fixtures -- ${{ github.event.client_payload.artist }}
env:
YOUTUBE_KEY: ${{ secrets.YOUTUBE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: Fetch new data for ${{ github.event.client_payload.artist || 'all' }}
branch: fetch_data
title: New Data for ${{ github.event.client_payload.artist || 'all' }}
body: |
Automated data fetch triggered by ${{ github.event.client_payload.type || 'cron' }}.