-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (64 loc) · 1.73 KB
/
main.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
65
66
67
68
69
70
71
72
name: main
on:
schedule:
- cron: "*/5 * * * *"
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 16
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests bs4
- name: Run script
run: |
cd parser
python run.py
- name: Install Node.js dependencies
run: |
cd discord
npm install
- name: Run Node.js script
env:
WEBHOOK: ${{ secrets.WEBHOOK }}
MENTION: ${{ secrets.MENTION }}
IMAGE: ${{ secrets.IMAGE }}
LOGO1: ${{ secrets.LOGO1 }}
LOGO2: ${{ secrets.LOGO2 }}
LOGO3: ${{ secrets.LOGO3 }}
LOGO4: ${{ secrets.LOGO4 }}
LOGO5: ${{ secrets.LOGO5 }}
LOGO6: ${{ secrets.LOGO6 }}
LOGO7: ${{ secrets.LOGO7 }}
run: |
cd discord
npm start
- name: Set date in environment variable
run: echo "DATE=$(date +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: Commit & Push changes
uses: Andro999b/push@patch-1
with:
github_token: ${{ secrets.MAKERS_TOKEN }}
branch: main
message: >
🎉 Updated date: ${{ env.DATE }}