Skip to content

Enhanced Microsoft Exchange External Forwarding Detection #57

Enhanced Microsoft Exchange External Forwarding Detection

Enhanced Microsoft Exchange External Forwarding Detection #57

name: Generate Indexes
on:
pull_request:
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@42375524e23c412d93fb67b49958b491fce71c38 #v5.4.0
with:
python-version: "3.11"
- name: Install dependencies
run: pip3 install -r ./.scripts/requirements.txt
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.PANTHER_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PANTHER_BOT_GPG_PRIVATE_KEY_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- 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 fetch origin ${{ github.event.pull_request.head.ref }}:${{ github.event.pull_request.head.ref }}
git checkout ${{ github.event.pull_request.head.ref }}
git add ./indexes
git commit -S -m "Update indexes"
git push origin ${{ github.event.pull_request.head.ref }}