Skip to content

Commit c9b2dac

Browse files
author
Alvaro Muñoz
committed
Update action.yml
1 parent 944bd84 commit c9b2dac

File tree

1 file changed

+12
-37
lines changed

1 file changed

+12
-37
lines changed

action.yml

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,36 @@ inputs:
55
token:
66
description: GitHub Token
77
default: ${{ github.token }}
8-
98
source-root:
109
description: "Path of the root source code directory, relative to $GITHUB_WORKSPACE."
1110
default: ${{ github.workspace }}
12-
1311
sarif-output:
1412
description: "SARIF File Output"
1513
default: "codeql-actions.sarif"
16-
1714
suite:
1815
description: "CodeQL Suite to run"
1916
default: "actions-code-scanning"
20-
21-
workflow-models:
22-
description: "Workflow models"
17+
workflow-extpack-path:
18+
description: "Path to Workflow extpack"
19+
required: false
20+
workflow-extpack-name:
21+
description: "Name of the Workflow extpack"
2322
required: false
2423

2524
runs:
2625
using: 'composite'
2726
steps:
28-
- name: Process workflow models
27+
- name: extpack contents
2928
shell: bash
30-
if: inputs.workflow-models
3129
env:
32-
MODELS: ${{ inputs.workflow-models }}
33-
run: |
34-
# Create QLPack directory
35-
mkdir workflow-extpack
36-
cd workflow-extpack
37-
38-
# Store the extension pack file
39-
echo "$MODELS" > models.yml
40-
41-
# Create QLPack
42-
cat > qlpack.yml << 'EOF'
43-
name: local/workflow-models
44-
library: true
45-
extensionTargets:
46-
githubsecuritylab/actions-all: '*'
47-
dataExtensions:
48-
- models.yml
49-
EOF
50-
51-
# Set env vars
52-
echo "EXTPACK_PATH=./workflow-extpack" >> $GITHUB_ENV
53-
echo "EXTPACK_NAME=local/workflow-models" >> $GITHUB_ENV
54-
55-
- name: Show contents
56-
shell: bash
30+
EXTPACK_PATH: ${{ intpus.workflow-extpack-path }}
31+
EXTPACK_NAME: ${{ inputs.workflow-extpack-name }}
5732
run: |
5833
echo "##[group] Workflow Models"
59-
if [ -f workflow-extpack/models.yml ]; then cat workflow-extpack/models.yml; fi
34+
if [ -f $EXTPACK_PATH/models.yml ]; then cat $EXTPACK_PATH/models.yml; fi
6035
echo "##[endgroup]"
6136
echo "##[group] QLPack"
62-
if [ -f workflow-extpack/qlpack.yml ]; then cat workflow-extpack/qlpack.yml; fi
37+
if [ -f $EXTPACK_PATH/qlpack.yml ]; then cat $EXTPACK_PATH/qlpack.yml; fi
6338
echo "##[endgroup]"
6439
6540
- name: Scan workflows
@@ -70,7 +45,7 @@ runs:
7045
INPUT_SOURCE-ROOT: ${{ inputs.source-root }}
7146
INPUT_SARIF-OUTPUT: ${{ inputs.sarif-output }}
7247
INPUT_SUITE: ${{ inputs.suite }}
73-
EXTPACK_PATH: ${{ env.EXTPACK_PATH }}
74-
EXTPACK_NAME: ${{ env.EXTPACK_NAME }}
48+
EXTPACK_PATH: ${{ intpus.workflow-extpack-path }}
49+
EXTPACK_NAME: ${{ inputs.workflow-extpack-name }}
7550
run: |
7651
node ${{ github.action_path }}/.github/action/dist/index.js

0 commit comments

Comments
 (0)