2023-07-21 13:54:19 +00:00
|
|
|
name: PR to update CPE dictionary index
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 1 * * 1" # every monday at 1 AM
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2023-09-15 18:18:42 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2023-07-21 13:54:19 +00:00
|
|
|
env:
|
2023-10-24 15:07:49 +00:00
|
|
|
SLACK_NOTIFICATIONS: true
|
2023-07-21 13:54:19 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
upgrade-cpe-dictionary-index:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.repository == 'anchore/syft' # only run for main repo
|
|
|
|
steps:
|
2024-03-12 17:18:44 +00:00
|
|
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 #v4.1.2
|
2023-07-21 13:54:19 +00:00
|
|
|
|
2023-10-25 13:08:43 +00:00
|
|
|
- name: Bootstrap environment
|
|
|
|
uses: ./.github/actions/bootstrap
|
|
|
|
|
2023-10-24 15:07:49 +00:00
|
|
|
- name: Bootstrap environment
|
|
|
|
uses: ./.github/actions/bootstrap
|
2023-07-21 13:54:19 +00:00
|
|
|
|
|
|
|
- run: |
|
|
|
|
make generate-cpe-dictionary-index
|
|
|
|
|
2023-09-20 14:12:13 +00:00
|
|
|
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0
|
2023-07-21 13:54:19 +00:00
|
|
|
id: generate-token
|
|
|
|
with:
|
|
|
|
app_id: ${{ secrets.TOKEN_APP_ID }}
|
|
|
|
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
|
|
|
|
|
2024-03-13 17:47:47 +00:00
|
|
|
- uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e #v6.0.2
|
2023-07-21 13:54:19 +00:00
|
|
|
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 }}
|
2023-10-24 15:07:49 +00:00
|
|
|
|
2024-01-29 17:32:30 +00:00
|
|
|
- uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 #v3.16.2
|
2023-10-24 15:07:49 +00:00
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
fields: workflow,eventName,job
|
|
|
|
text: Syft CPE dictionary index update failed
|
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
|
|
|
if: ${{ failure() && env.SLACK_NOTIFICATIONS == 'true' }}
|