Run Scripts and Update README #179
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: Run Scripts and Update README | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs every 24 hours | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
run-scripts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run map_wigle_devices.py | |
run: python scripts/map_wigle_devices.py | |
env: | |
API_NAME: ${{ secrets.API_NAME }} | |
API_TOKEN: ${{ secrets.API_TOKEN }} | |
AUTH_HEADER: ${{ secrets.AUTH_HEADER }} | |
continue-on-error: true | |
- name: Run generate_map_html.py | |
run: python scripts/generate_map_html.py | |
continue-on-error: true | |
- name: Run generate_map_png.py | |
run: python scripts/generate_map_png.py | |
continue-on-error: true | |
# - name: Run classify_locations.py | |
# run: python scripts/classify_locations.py | |
# continue-on-error: true | |
- name: Run update_readme_stats.py | |
run: python scripts/update_readme_stats.py | |
continue-on-error: true | |
- name: Commit and push changes | |
run: | | |
git config user.name "${{ secrets.USERNAME }}" | |
git config user.email "${{ secrets.EMAIL }}" | |
git add -A | |
git commit -m "Update Statistics and HTML files" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
branch: ${{ github.ref }} | |