Skip to content

Commit

Permalink
[No Ticket] Adds attributions to release assets (#1405)
Browse files Browse the repository at this point in the history
  • Loading branch information
meghfossa authored Apr 5, 2024
1 parent 63f5d60 commit 133a063
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
release:
types: [published]

jobs:
add-attributions-to-release:
name: add-attributions-to-release ${{ github.event.release.tag_name }}
runs-on: ubuntu-latest

# release changes require contents write
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Install fossa-cli
run: |
./install-latest.sh -d
# since this is only invoked after the release is published,
# we can safely presume that fossa has ran dependency scan on the commit
# from 'dependency-scan' job!
#
# docs: https://cli.github.com/manual/gh_release_upload
- name: Persist attributions to release
run: |
fossa report --format cyclonedx-json attribution > fossa-cli-attribution.bom.json
gh release upload ${{ github.event.release.tag_name }} fossa-cli-attribution.bom.json
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 133a063

Please sign in to comment.