Skip to content

Commit 590a75c

Browse files
committed
update github workflows
1 parent b437441 commit 590a75c

2 files changed

Lines changed: 26 additions & 6 deletions

File tree

.github/workflows/build_and_release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- 'nuclei-sap-templates/**'
99
- 'container/**'
1010
- 'tools/**'
11+
schedule:
12+
- cron: "0 3 1 * *" # 03:00 UTC on the 1st of every month
1113

1214
env:
1315
REGISTRY: ghcr.io
Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
1-
name: ❄️ YAML Lint
1+
name: YAML Lint
22

33
on:
44
pull_request:
5-
paths:
6-
- '**.yaml'
75
workflow_dispatch:
86

97
jobs:
10-
build:
8+
yamllint:
9+
name: yamllint
1110
runs-on: ubuntu-latest
1211
if: github.repository == 'projectdiscovery/nuclei-templates'
12+
1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: Yamllint
15+
16+
# Detect whether YAML files changed in this PR
17+
- name: Check changed files
18+
- uses: dorny/paths-filter@v3
19+
id: changes
20+
with:
21+
filters: |
22+
yaml:
23+
- '**/*.yml'
24+
- '**/*.yaml'
25+
26+
# If YAML changed -> run yamllint
27+
- name: Run yamllint
28+
if: steps.changes.outputs.yaml == 'true'
1629
uses: karancode/yamllint-github-action@v2.1.1
1730
with:
1831
yamllint_config_filepath: .yamllint
1932
yamllint_strict: false
20-
yamllint_comment: true
33+
yamllint_comment: true
34+
35+
# If NO YAML changed -> still succeed, so required check is satisfied
36+
- name: No YAML changes
37+
if: steps.changes.outputs.yaml != 'true'
38+
run: echo "No YAML changes in this PR; skipping yamllint."

0 commit comments

Comments
 (0)