Skip to content

Commit 547804f

Browse files
committed
Merge main and fix conflicts
Signed-off-by: tdruez <[email protected]>
2 parents 49dbc02 + e0a8e53 commit 547804f

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Workflows.
2222
- [Provide download URLs inputs](#provide-download-urls-inputs)
2323
- [Fetch pipelines inputs](#fetch-pipelines-inputs)
2424
- [Define a custom project name](#define-a-custom-project-name)
25+
- [Install ScanCode.io from a repository branch](#install-scancodeio-from-a-repository-branch)
2526
- [Where does the scan results go?](#where-does-the-scan-results-go)
2627

2728
## Usage
@@ -170,6 +171,14 @@ For details on setting up and configuring your own instance, please refer to the
170171
project-name: "my-project-name"
171172
```
172173

174+
### Install ScanCode.io from a repository branch
175+
176+
```yaml
177+
- uses: nexB/scancode-action@alpha
178+
with:
179+
scancodeio-repo-branch: "main"
180+
```
181+
173182
## Where are the Scan Results?
174183

175184
Upon completion of the workflow, you can **find the scan results** in the dedicated

action.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ inputs:
3131
python-version:
3232
description: "Python version."
3333
default: "3.11"
34+
scancodeio-repo-branch:
35+
description: "Branch to install ScanCode.io from the GitHub repository (optional)"
36+
required: false
37+
default: ""
3438

3539
runs:
3640
using: "composite"
@@ -58,8 +62,17 @@ runs:
5862
- name: Install ScanCode.io
5963
shell: bash
6064
run: |
61-
pip install --upgrade scancodeio
62-
scanpipe migrate --verbosity 0
65+
if [ -z "${{ inputs.scancodeio-repo-branch }}" ]; then
66+
echo "Installing the latest ScanCode.io release from PyPI"
67+
pip install --upgrade scancodeio
68+
else
69+
echo "Installing ScanCode.io from the GitHub branch: ${{ inputs.scancodeio-repo-branch }}"
70+
pip install git+https://github.com/aboutcode-org/scancode.io.git@${{ inputs.scancodeio-repo-branch }}
71+
fi
72+
73+
- name: Run migrations to prepare the database
74+
shell: bash
75+
run: scanpipe migrate --verbosity 0
6376

6477
- name: Generate `--pipeline` CLI arguments
6578
shell: bash

0 commit comments

Comments
 (0)