mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 18:46:41 +01:00
Bumps the actions-minor-patch group with 2 updates in the / directory: [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action). Updates `peter-evans/create-pull-request` from 8.0.0 to 8.1.0 - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](98357b18bf...c0f553fe54) Updates `zizmorcore/zizmor-action` from 0.3.0 to 0.4.1 - [Release notes](https://github.com/zizmorcore/zizmor-action/releases) - [Commits](e639db9933...135698455d) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: 8.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-patch - dependency-name: zizmorcore/zizmor-action dependency-version: 0.4.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
85 lines
2.9 KiB
YAML
85 lines
2.9 KiB
YAML
name: PR to update CPE dictionary index
|
|
on:
|
|
schedule:
|
|
- cron: "0 1 * * 1" # every monday at 1 AM
|
|
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
SLACK_NOTIFICATIONS: true
|
|
|
|
jobs:
|
|
upgrade-cpe-dictionary-index:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
if: github.repository == 'anchore/syft' # only run for main repo
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Bootstrap environment
|
|
uses: ./.github/actions/bootstrap
|
|
id: bootstrap
|
|
|
|
- name: Login to GitHub Container Registry
|
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | .tool/oras login ghcr.io -u "$ACTOR" --password-stdin
|
|
env:
|
|
ACTOR: ${{ github.actor }}
|
|
|
|
- name: Pull CPE cache from registry
|
|
run: make generate:cpe-index:cache:pull
|
|
|
|
- name: Update CPE cache from NVD API
|
|
run: make generate:cpe-index:cache:update
|
|
env:
|
|
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
|
|
|
|
- name: Generate CPE dictionary index
|
|
run: make generate:cpe-index:build
|
|
|
|
- name: Push updated CPE cache to registry
|
|
run: make generate:cpe-index:cache:push
|
|
|
|
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf #v2.2.1
|
|
id: generate-token
|
|
with:
|
|
app-id: ${{ secrets.TOKEN_APP_ID }}
|
|
private-key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
|
|
|
|
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 #v8.1.0
|
|
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 }}
|
|
|
|
- name: Notify Slack on failure
|
|
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a #v2.1.1
|
|
with:
|
|
webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
|
webhook-type: incoming-webhook
|
|
payload: |
|
|
text: "Syft CPE dictionary index update failed"
|
|
blocks:
|
|
- type: section
|
|
text:
|
|
type: mrkdwn
|
|
text: |
|
|
*Syft CPE dictionary index update failed*
|
|
• Workflow: `${{ github.workflow }}`
|
|
• Event: `${{ github.event_name }}`
|
|
• Job Status: `${{ job.status }}`
|
|
• <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>
|
|
if: ${{ failure() && env.SLACK_NOTIFICATIONS == 'true' }}
|