Skip to content

Fetch the Latest Insights Data #806

Fetch the Latest Insights Data

Fetch the Latest Insights Data #806

Workflow file for this run

name: Fetch the Latest Insights Data
on:
workflow_dispatch:
schedule:
- cron: '0 18 * * *'
push:
branches:
- main
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update JSON data
run: python main.py -t ${{ env.GH_TOKEN }}
- name: Commit and push changes
run: |-
git add .
git diff
git config --global user.email "github-action-bot@specterops.io"
git config --global user.name "GitHub Action Bot"
git commit -m "Updated insights data" -a || echo "No changes to commit"
git push