mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 21:11:53 +00:00
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: 'Docs: Check Provider Cards Snippet'
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'v5.*'
|
|
paths:
|
|
- 'docs/user-guide/providers/**/getting-started-*.mdx'
|
|
- 'docs/scripts/generate_provider_cards.py'
|
|
- 'docs/snippets/provider-cards.mdx'
|
|
- 'api/src/backend/api/models.py'
|
|
- '.github/workflows/docs-check-provider-cards.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
check-provider-cards:
|
|
if: github.repository == 'prowler-cloud/prowler'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
|
with:
|
|
egress-policy: block
|
|
allowed-endpoints: >
|
|
github.com:443
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Verify provider cards snippet is up to date
|
|
run: |
|
|
if ! python3 docs/scripts/generate_provider_cards.py; then
|
|
echo "::error::docs/snippets/provider-cards.mdx is out of sync with the provider getting-started pages or the API ProviderChoices enum."
|
|
echo "Run 'python3 docs/scripts/generate_provider_cards.py' locally and commit the regenerated snippet."
|
|
echo "--- diff ---"
|
|
git diff docs/snippets/provider-cards.mdx
|
|
exit 1
|
|
fi
|