Skip to content

Commit e4a2d31

Browse files
author
Ghulam Nasir
committed
main: add flutter report & make both the reports conditional
1 parent 9524c8f commit e4a2d31

3 files changed

Lines changed: 54 additions & 6 deletions

File tree

.github/workflows/flutter-deploy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@ on:
3333
description: "Should obfuscate the dart code?"
3434
type: boolean
3535
default: false
36+
dependency-reports:
37+
description: "Generate dependency reports"
38+
type: boolean
39+
default: true
40+
3641
workflow_dispatch:
42+
inputs:
43+
dependency-reports:
44+
description: "Generate dependency reports"
45+
type: boolean
46+
default: true
3747

3848
concurrency:
3949
group: ${{ github.workflow }}-${{ github.ref }}
@@ -204,3 +214,10 @@ jobs:
204214
repo-token: ${{ secrets.GITHUB_TOKEN }}
205215
name-suffix: ${{ needs.android-name-suffix-generation.outputs.name-suffix }}
206216
artifact-path: ${{ steps.flutter-build.outputs.artifact-path }}
217+
dependency-reports:
218+
if: ${{ inputs.dependency-reports }}
219+
uses: QuickBirdEng/workflows/.github/workflows/vulnerability-and-outdated-packages-report.yml@main
220+
with:
221+
flutter-working-dir: ${{ inputs.working-directory }}
222+
flutter-report: true
223+
secrets: inherit

.github/workflows/flutter-release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ on:
4242
description: "Should obfuscate the dart code?"
4343
type: boolean
4444
default: false
45+
dependency-reports:
46+
description: "Generate dependency reports"
47+
type: boolean
48+
default: true
4549
workflow_dispatch:
4650

4751
concurrency:
@@ -263,3 +267,10 @@ jobs:
263267
repo-token: ${{ secrets.GITHUB_TOKEN }}
264268
name-suffix: ${{ needs.android-name-suffix-generation.outputs.name-suffix }}
265269
artifact-path: ${{ steps.flutter-build.outputs.artifact-path }}
270+
dependency-reports:
271+
if: ${{ inputs.dependency-reports }}
272+
uses: QuickBirdEng/workflows/.github/workflows/vulnerability-and-outdated-packages-report.yml@main
273+
with:
274+
flutter-working-dir: ${{ inputs.working-directory }}
275+
flutter-report: true
276+
secrets: inherit

.github/workflows/vulnerability-and-outdated-packages-report.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,35 @@ on:
33
inputs:
44
node-version:
55
description: 'Node version'
6-
required: true
76
type: string
7+
default: "18"
88
modules:
99
description: 'Modules to check'
10-
required: true
10+
required: false
1111
type: string
1212
reports-dir:
1313
description: 'Reports directory'
1414
required: false
1515
type: string
1616
default: reports
17-
18-
concurrency:
19-
group: ${{ github.workflow }}-${{ github.ref }}
20-
cancel-in-progress: true
17+
flutter-working-dir:
18+
description: 'Flutter working directory'
19+
required: false
20+
type: string
21+
default: .
22+
web-report:
23+
description: 'Enable Web Vulnerability and Outdated Packages Report'
24+
type: boolean
25+
default: false
26+
flutter-report:
27+
description: 'Enable Flutter Vulnerability and Outdated Packages Report'
28+
type: boolean
29+
default: false
2130

2231
jobs:
2332
web:
2433
runs-on: [ self-hosted, node ]
34+
if: ${{ inputs.web-report }}
2535
steps:
2636
- name: Checkout
2737
uses: actions/checkout@v2
@@ -30,3 +40,13 @@ jobs:
3040
with:
3141
modules: ${{ inputs.modules }}
3242
node-version: ${{ inputs.node-version }}
43+
flutter:
44+
runs-on: [self-hosted, macOS]
45+
if: ${{ inputs.flutter-report }}
46+
steps:
47+
- uses: QuickBirdEng/actions/checkout-ssh@main
48+
with:
49+
ssh-private-key: ${{ secrets.CI_SSH_PRIVATE_KEY_FOR_GITHUB_PRIVATE_REPOS }}
50+
- uses: QuickBirdEng/actions/flutter-vulnerability-and-outdated-packages-report@main
51+
with:
52+
working-dir: ${{ inputs.flutter-working-dir }}

0 commit comments

Comments
 (0)