-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (33 loc) · 1.14 KB
/
crawl.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
name: Crawl
on:
push:
branches:
- master
jobs:
crawl:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Create .env file
run: |
echo "NODE_ENV=${{ secrets.NODE_ENV }}" > .env
echo "OPEN_DB_KEY=${{ secrets.OPEN_DB_KEY }}" >> .env
echo "OPEN_DB_IV=${{ secrets.OPEN_DB_IV }}" >> .env
echo "PHPSESSID=${{ secrets.PHPSESSID }}" >> .env
- name: Print .env file content
run: cat .env
- name: Generate random string
id: random_string
run: echo "RANDOM_STRING=$(openssl rand -hex 16)" >> date.txt
- name: Print random string
run: echo "${{ steps.random_string.outputs.RANDOM_STRING }}"
- name: Push to Github
run: |
git add ./db
git config --global user.name "Zain-ul-din"
git config --global user.email "[email protected]"
git commit -m "🤖 Github Action: updated encrypted DB"
git push origin master
# Appendix:
# https://stackoverflow.com/questions/72851548/permission-denied-to-github-actionsbot