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

Auto Generated Indexes v2 #1472

Merged
merged 13 commits into from
Jan 31, 2025
Merged
43 changes: 43 additions & 0 deletions .github/workflows/generate-indexes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Generate Indexes

on:
# Since this workflow runs on push to develop and also pushes to develop, we need ensure that it does not loop This
# is done by ignoring changes to the indexes directory. The script below must never write outside of this directory.
push:
branches:
- develop
paths-ignore:
- 'indexes/**'

permissions:
contents: write

jobs:
generate-indexes:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
env:
GITHUB_TOKEN: ${{ secrets.PANTHER_BOT_AUTOMATION_TOKEN }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
fetch-depth: 0
token: ${{ env.GITHUB_TOKEN || github.token }}
- name: Install Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b #v5.3.0
with:
python-version: "3.11"
- name: Install dependencies
run: pip3 install -r ./.scripts/requirements.txt
- name: Generate indexes
run: python3 ./.scripts/generate_indexes.py
- name: Commit Indexes
continue-on-error: true # This is to ensure that the workflow does not fail if there are no changes to commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "panther-bot-automation"
git add ./indexes
git commit -m "Update indexes"
git push --no-sign
Loading
Loading