Skip to content

Commit 104b837

Browse files
compose workflows
1 parent b8291c7 commit 104b837

6 files changed

Lines changed: 47 additions & 21 deletions

File tree

.github/workflows/build-module.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
name: Export module package
1+
name: Build module
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: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
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:
127
working-directory: ./widget
138
jobs:
14-
build-widget:
9+
build:
1510
runs-on: ubuntu-latest
1611
steps:
1712
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/pull-request.yml

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

.github/workflows/push-stable.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Push to stable branch
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: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
name: Run Snyk scan
1+
name: Run Snyk scans
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=module/build.gradle

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,7 @@ The userlibs for the PushNotifications module are not part of the repo.
5858
To fetch them, run the `updateUserLibs` task after checking out the repo (and after switching branches).
5959

6060
Changes to the `userlib` folder are ignored by git.
61-
If you make any changes to the libraries required by other modules, you must commit these explicitly, using e.g. `git add -f <path>`.
61+
If you make any changes to the libraries required by other modules, you must commit these explicitly, using e.g. `git add -f <path>`.
62+
63+
Although the widget is built as part of the CI workflows, it is not integrated into the module.
64+
Newly built widget versions must always be committed manually.

0 commit comments

Comments
 (0)