-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.57 KB
/
push_notification.yaml
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
name: Push Notification
on:
# push:
# branches:
# - main
schedule:
- cron: '0 11 * * *'
jobs:
run-script:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./scrapper
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.2.0'
cache: 'npm'
cache-dependency-path: ./scrapper/package-lock.json
- name: Install dependencies
run: npm install
- name: Set environment variable
run:
echo "FIREBASE_PROJECT_ID=${{ secrets.FIREBASE_PROJECT_ID }}" >> $GITHUB_ENV
echo "FIREBASE_PRIVATE_KEY_ID=${{ secrets.FIREBASE_PRIVATE_KEY_ID }}" >> $GITHUB_ENV
echo "FIREBASE_PRIVATE_KEY=${{ secrets.FIREBASE_PRIVATE_KEY }}" >> $GITHUB_ENV
echo "FIREBASE_CLIENT_EMAIL=${{ secrets.FIREBASE_CLIENT_EMAIL }}" >> $GITHUB_ENV
echo "FIREBASE_CLIENT_ID=${{ secrets.FIREBASE_CLIENT_ID }}" >> $GITHUB_ENV
echo "FIREBASE_AUTH_URI=${{ secrets.FIREBASE_AUTH_URI }}" >> $GITHUB_ENV
echo "FIREBASE_TOKEN_URI=${{ secrets.FIREBASE_TOKEN_URI }}" >> $GITHUB_ENV
echo "FIREBASE_AUTH_PROVIDER_X509_CERT_URL=${{ secrets.FIREBASE_AUTH_PROVIDER_X509_CERT_URL }}" >> $GITHUB_ENV
echo "FIREBASE_CLIENT_X509_CERT_URL=${{ secrets.FIREBASE_CLIENT_X509_CERT_URL }}" >> $GITHUB_ENV
echo "FIREBASE_UNIVERSE_DOMAIN=${{ secrets.FIREBASE_UNIVERSE_DOMAIN }}" >> $GITHUB_ENV
- name: Run script
run: node push_notification.js