Skip to content

Commit f91c092

Browse files
Merge pull request #51 from step-security/fix_Audit-Package-Workflow
integrated with updated audit fix to handle provided build script
2 parents 494a520 + 81279df commit f91c092

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

.github/workflows/actions_release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
name: Release GitHub Actions
2-
32
on:
43
workflow_dispatch:
54
inputs:
65
tag:
76
description: "Tag for the release"
87
required: true
8+
script:
9+
description: "Specify the build script to run"
10+
required: false
11+
type: string
12+
default: "npm run test"
913

1014
permissions:
1115
contents: read
12-
1316
jobs:
1417
release:
1518
permissions:
@@ -18,4 +21,5 @@ jobs:
1821
contents: write
1922
uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1
2023
with:
21-
tag: "${{ github.event.inputs.tag }}"
24+
tag: "${{ github.event.inputs.tag }}"
25+
script: "${{ github.event.inputs.script }}"

.github/workflows/audit-package.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
1-
name: NPM Audit Fix Run
1+
name: Dependency Audit Fix Run
22

33
on:
44
workflow_dispatch:
55
inputs:
6+
package_manager:
7+
required: false
8+
default: "npm"
69
force:
710
description: "Use --force flag for npm audit fix?"
8-
required: true
11+
required: false
912
type: boolean
1013
base_branch:
11-
description: "Specify a base branch"
1214
required: false
1315
default: "main"
16+
use_private_packages:
17+
description: "Use private packages (default: false)"
18+
required: false
19+
type: boolean
20+
script:
21+
required: false
22+
default: "npm run test"
23+
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
packages: read
1428

1529
jobs:
1630
audit-fix:
17-
uses: step-security/reusable-workflows/.github/workflows/npm_audit_fix.yml@v1
31+
uses: step-security/reusable-workflows/.github/workflows/audit_fix.yml@v1
1832
with:
33+
package_manager: ${{ inputs.package_manager }}
1934
force: ${{ inputs.force }}
2035
base_branch: ${{ inputs.base_branch }}
21-
22-
permissions:
23-
contents: write
24-
pull-requests: write
36+
use_private_packages: ${{ inputs.use_private_packages }}
37+
script: ${{ inputs.script }}

0 commit comments

Comments
 (0)