-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmap-deploy-to-develop-template.yml
More file actions
58 lines (52 loc) · 1.81 KB
/
map-deploy-to-develop-template.yml
File metadata and controls
58 lines (52 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Run D2D on build and source archives
on:
workflow_call:
inputs:
artifact-name:
description: "Artifact containing the build archive"
required: true
type: string
steps:
description: "Comma separated D2D steps to run"
required: false
type: string
repository:
description: "Project's repository. Defaults to workflow's repository."
required: false
type: string
jobs:
run-d2d-pipeline:
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout the action from the current branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: action.yml
sparse-checkout-cone-mode: false
path: scancode-action
persist-credentials: false
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ${{ inputs.repository || github.repository }}
persist-credentials: false
- name: Download build artifact
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: ${{ inputs['artifact-name'] }}
path: scancode-inputs/
- name: Prepare D2D inputs
shell: bash
run: |
for file in scancode-inputs/*; do
base=$(basename "$file")
mv "$file" "scancode-inputs/to_$base"
done
git archive --format=tar.gz -o scancode-inputs/from.tar.gz HEAD
- name: Run D2D pipeline
uses: ./scancode-action
with:
pipelines: ${{ inputs.steps && format('map_deploy_to_develop:%s', inputs.steps) || 'map_deploy_to_develop' }}
inputs-path: scancode-inputs