Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples.yml #216

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
59 changes: 59 additions & 0 deletions .github/workflows/samples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Python Selenium Script

on:
schedule:
- cron: '0 */12 * * *'

jobs:
run-selenium:
runs-on: ubuntu-latest

env:
WEBHOOK_URL: ${{ secrets.WEBHOOK }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: 3.x

- name: Install dependencies
run: |
pip install selenium
pip install requests

- name: Install FFmpeg
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg

- name: Install SRT
run: |
git clone https://github.com/Haivision/srt.git
cd srt
sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential
./configure
make
sudo make install
cd ..

- name: Install Chrome
run: |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb

- name: Install ChromeDriver
run: |
wget "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/linux64/chromedriver-linux64.zip"
unzip chromedriver-linux64.zip
cd chromedriver-linux64
sudo mv chromedriver /usr/bin/chromedriver
sudo chown root:root /usr/bin/chromedriver
sudo chmod +x /usr/bin/chromedriver

- name: Run Selenium script
run: |
python antmedia-samples.py