Skip to content

Commit

Permalink
ci: Fixed artifact upload/download for fossology
Browse files Browse the repository at this point in the history
Signed-off-by: Taras Drozdovskyi <[email protected]>
  • Loading branch information
tdrozdovsky committed Feb 6, 2024
1 parent 48bd43e commit 0836ae9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 40 deletions.
44 changes: 9 additions & 35 deletions .github/workflows/fossology.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Fossology check
on: [push, pull_request]
on: [pull_request, push]

# permissions:
# contents: read
permissions:
contents: read

jobs:
check-license:
name: Check license
name: Check license, copyright, keyword
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
Expand All @@ -19,40 +19,14 @@ jobs:
-e GITHUB_REPO_OWNER=${{ github.repository_owner }} \
-e GITHUB_API=${{ github.api_url }} \
-e GITHUB_ACTIONS=true \
fossology/fossology:scanner "/bin/fossologyscanner" --report TEXT repo nomos ojo
# - name: Upload artifact
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
fossology/fossology:scanner "/bin/fossologyscanner" --report TEXT repo nomos ojo copyright keyword
# Upload artifact
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: scan-fossology-report
path: ./results

# - name: Artifact download
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: scan-fossology-report

check-copyright:
name: Check copyright
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- run: |
docker run --rm --name "fossologyscanner" -w "/opt/repo" -v ${PWD}:/opt/repo \
-e GITHUB_TOKEN=${{ github.token }} \
-e GITHUB_PULL_REQUEST=${{ github.event.number }} \
-e GITHUB_REPOSITORY=${{ github.repository }} \
-e GITHUB_API=${{ github.api_url }} \
-e GITHUB_REPO_URL=${{ github.repositoryUrl }} \
-e GITHUB_REPO_OWNER=${{ github.repository_owner }} \
-e GITHUB_ACTIONS=true \
fossology/fossology:scanner "/bin/fossologyscanner" --report TEXT repo copyright keyword
# - name: Upload artifact
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: scan-fossology-report
path: ./results

# - name: Artifact download
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
# Artifact download
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe
with:
name: scan-fossology-report
4 changes: 2 additions & 2 deletions .github/workflows/license-finder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
license_finder > ./license-finder-report
- name: Upload artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: scan-license-finder-report
path: ./license-finder-report

- name: Artifact download
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe
with:
name: scan-license-finder-report
4 changes: 2 additions & 2 deletions .github/workflows/scancode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
run: scancode -clpeui -n 2 --cyclonedx ./results/sbom-cyclonedx --spdx-rdf ./results/sbom-spdx ./

- name: Upload artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: scan-scancode-report
path: ./results/

- name: Artifact download
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe
with:
name: scan-scancode-report
2 changes: 1 addition & 1 deletion .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

# Upload the results as artifacts (optional).
- name: "Upload artifact"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: SARIF file
path: results.sarif
Expand Down

0 comments on commit 0836ae9

Please sign in to comment.