Skip to content

Commit d450528

Browse files
committed
Allow reusing static analysis workflow
1 parent 59c1583 commit d450528

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/static-analysis.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ on:
1212
- "v*.*"
1313
- "master"
1414
- "feature/*"
15-
tags:
16-
- "*"
15+
workflow_call:
16+
inputs:
17+
ref:
18+
description: "The git reference to check"
19+
type: string
20+
required: true
1721

1822
env:
1923
PHP_VERSION: "8.2"
@@ -27,6 +31,8 @@ jobs:
2731
steps:
2832
- name: "Checkout"
2933
uses: "actions/checkout@v4"
34+
with:
35+
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
3036

3137
- name: "Setup"
3238
uses: "./.github/actions/setup"
@@ -43,6 +49,7 @@ jobs:
4349
sarif_file: psalm.sarif
4450

4551
rector:
52+
if: ${{ github.event_name != 'workflow_dispatch' }}
4653
name: "Rector"
4754
runs-on: "ubuntu-22.04"
4855

0 commit comments

Comments
 (0)