Skip to content

Update main.yml

Update main.yml #147

Workflow file for this run

name: Main
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Install Packages
run: sudo apt install ffmpeg unzip python3 -y && pip install -r requirements.txt
# Runs a set of commands using the runners shell
- name: install playerwright
run: |
python3 -m playwright install
python3 -m playwright install-deps
- name: git config
run: |
git config --global user.name "github-actions"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git pull
- name: get assets and needed files.
run: |
rm -rf assets
wget https://cdn.discordapp.com/attachments/863414605342703636/1176079298017374258/assets.zip?ex=656d9033&is=655b1b33&hm=dab5ce535c27d627d2576f6ce0431752c4c244ca1d77f52de3079805debbd0df&
rm -rf assets.zip
- name: set vars
run: echo "set vars"
env:
## Environment variable for step.
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: run the program
run: python3 main.py
- name: pull latest files
run: git pull -f
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 👍 New reddit videos from $(date +%F)