-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (37 loc) · 1.25 KB
/
addWhitelistedRetoolDapps.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
name: Whitelist Retool Dapps
on:
schedule:
- cron: '0 1,13 * * *'
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18.12.0
- name: Install dependencies with yarn
run: yarn install
- name: Set environment variables from secrets
run: |
touch .env
echo GOOGLE_CLIENT_EMAIL=${{ secrets.GOOGLE_CLIENT_EMAIL }} >> .env
echo RETOOL_DAPPS_SHEET_ID=${{ secrets.RETOOL_DAPPS_SHEET_ID }} >> .env
echo GOOGLE_PRIVATE_KEY=${{ secrets.GOOGLE_PRIVATE_KEY }} >> .env
cat .env
working-directory: ./scripts
- name: Run the script with environment variable
run: node whitelistDapps.js
working-directory: ./scripts
- name: Check for changes in reservedDappsName.json
run: |
git diff --quiet || {
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
git add reservedDappNames.json
git commit -m "Update reservedDappNames.json"
git push origin HEAD
}
working-directory: ./scripts