gghosts #96
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: gghosts | |
on: | |
schedule: | |
- cron: "0 16 * * 0" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Installing package list | |
run: apt list --installed | |
- name: Removing previous chrome instances on runner | |
run: sudo apt purge google-chrome-stable | |
# Need to fetch reqs if needed | |
- name: Installing all necessary packages | |
run: pip install requests chromedriver-autoinstaller selenium pyvirtualdisplay beautifulsoup4 pandas webdriver-manager | |
- name: Install xvfb | |
run: sudo apt-get install xvfb | |
- name: Ping IP and save hosts | |
run: python gghosts.py | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Nanqiang01" | |
git add . | |
git commit -m "Update gghosts.txt" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GGHOSTS }} | |
branch: main |