.github/workflows/main.yml #36496
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |