Update vulnerability.yml to validate ecs workflow #15
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: ECS Generator | |
on: | |
push: | |
paths: | |
- "ecs/**/*.json" | |
- "ecs/**/*.yml" | |
jobs: | |
run-ecs-generator: | |
if: github.repository == 'wazuh/wazuh-indexer' | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: branch-name | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up Docker Compose | |
run: sudo apt-get install docker-compose | |
- name: Generate PR to wazuh-indexer-plugins | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} | |
run: | | |
bash ecs/scripts/generate-pr-to-plugins.sh \ | |
-b ${{ steps.branch-name.outputs.branch }} \ | |
-o ./ecs-templates | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ecs-templates | |
path: "./ecs-templates" |