Skip to content

Commit 230f9db

Browse files
compose workflows
1 parent b8291c7 commit 230f9db

File tree

5 files changed

+38
-17
lines changed

5 files changed

+38
-17
lines changed

.github/workflows/build-module.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: Export module package
22
on:
3-
push:
4-
paths:
5-
- "module/**"
6-
pull_request:
7-
paths:
8-
- "module/**"
3+
workflow_call:
94
workflow_dispatch:
105
jobs:
116
build:

.github/workflows/build-widget.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: Build widget
22
on:
3-
push:
4-
paths:
5-
- "widget/**"
6-
pull_request:
7-
paths:
8-
- "widget/**"
3+
workflow_call:
94
workflow_dispatch:
105
defaults:
116
run:

.github/workflows/pull-request.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Build widget
2+
on:
3+
pull_request:
4+
jobs:
5+
build-module:
6+
uses: ./.github/workflows/build-module.yml
7+
build-widget:
8+
uses: ./.github/workflows/build-widget.yml
9+
snyk:
10+
uses: ./.github/workflows/snyk.yml
11+
secrets: inherit

.github/workflows/push-master.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Run Snyk scan
2+
3+
on:
4+
push:
5+
branches: [ "master", "mx8" ]
6+
7+
jobs:
8+
snyk:
9+
uses: ./.github/workflows/snyk.yml
10+
with:
11+
command: "monitor"
12+
suffix: -${{ github.ref_name }}
13+
secrets: inherit

.github/workflows/snyk.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
name: Run Snyk scan
22

33
on:
4-
push:
5-
branches: [ "master" ]
4+
workflow_call:
5+
inputs:
6+
command:
7+
type: string
8+
required: false
9+
default: 'test'
10+
suffix:
11+
type: string
12+
required: false
613
workflow_dispatch:
714

815
jobs:
9-
snyk-test:
16+
snyk-test-gradle:
1017
runs-on: ubuntu-latest
1118
steps:
1219
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -15,5 +22,5 @@ jobs:
1522
env:
1623
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
1724
with:
18-
command: monitor
19-
args: --project-name="MxPushNotifications" --file=build.gradle
25+
command: ${{ inputs.command }}
26+
args: --project-name="gradle${{ inputs.suffix }}" --file=build.gradle

0 commit comments

Comments
 (0)