fix: Correct branch detection in security-scan.yml
- Handle pull_request events correctly (use head_ref) - Support staging branch in security scans - Add workflow_dispatch input for branch selection - Fix REF_NAME extraction for all event types
This commit is contained in:
@@ -2,13 +2,18 @@ name: Security Vulnerability Scan
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, develop ]
|
branches: [ main, develop, staging ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, develop ]
|
branches: [ main, develop, staging ]
|
||||||
schedule:
|
schedule:
|
||||||
# Daily security scan at 2 AM UTC
|
# Daily security scan at 2 AM UTC
|
||||||
- cron: '0 2 * * *'
|
- cron: '0 2 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: 'Branch to scan'
|
||||||
|
required: false
|
||||||
|
default: 'main'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security-audit:
|
security-audit:
|
||||||
|
|||||||
Reference in New Issue
Block a user