mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
* Introduce indexed embedded CPE dictionary Signed-off-by: Dan Luhring <dluhring@chainguard.dev> * Don't generate cpe-index on make snapshot Signed-off-by: Dan Luhring <dluhring@chainguard.dev> * Add unit tests for individual addEntry funcs Signed-off-by: Dan Luhring <dluhring@chainguard.dev> * migrate CPE index build to go generate and add periodic workflow Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * add test to ensure generated cpe index is wired up to function that uses it Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Dan Luhring <dluhring@chainguard.dev> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: PR to update CPE dictionary index
|
|
on:
|
|
schedule:
|
|
- cron: "0 1 * * 1" # every monday at 1 AM
|
|
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
GO_VERSION: "1.20.x"
|
|
GO_STABLE_VERSION: true
|
|
|
|
jobs:
|
|
upgrade-cpe-dictionary-index:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'anchore/syft' # only run for main repo
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
stable: ${{ env.GO_STABLE_VERSION }}
|
|
|
|
- run: |
|
|
make generate-cpe-dictionary-index
|
|
|
|
- uses: tibdex/github-app-token@v1
|
|
id: generate-token
|
|
with:
|
|
app_id: ${{ secrets.TOKEN_APP_ID }}
|
|
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
|
|
|
|
- uses: peter-evans/create-pull-request@v5
|
|
with:
|
|
signoff: true
|
|
delete-branch: true
|
|
branch: auto/latest-cpe-dictionary-index
|
|
labels: dependencies
|
|
commit-message: "chore(deps): update CPE dictionary index"
|
|
title: "chore(deps): update CPE dictionary index"
|
|
body: |
|
|
Update CPE dictionary index based on the latest available CPE dictionary
|
|
token: ${{ steps.generate-token.outputs.token }}
|