Skip to content

Remove support for v1 & v2 schemas (#434) #10

Remove support for v1 & v2 schemas (#434)

Remove support for v1 & v2 schemas (#434) #10

name: PR to update generated code
on:
schedule:
- cron: "0 1 * * 1" # every monday at 1 AM
workflow_dispatch:
# TODO: delete me
push:
permissions:
contents: read
env:
SLACK_NOTIFICATIONS: true
jobs:
run-code-gen:
name: "Run code generation"
runs-on: ubuntu-latest
if: github.repository == 'anchore/grype-db' # only run for main repo
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Bootstrap environment
uses: ./.github/actions/bootstrap
- run: |
make generate-processor-code
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0
id: generate-token
with:
app_id: ${{ secrets.TOKEN_APP_ID }}
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
with:
signoff: true
delete-branch: true
branch: auto/latest-code-gen
labels: dependencies
commit-message: "chore(deps): update generated code"
title: "chore(deps): update generated code"
body: |
Update generated code from external sources
token: ${{ steps.generate-token.outputs.token }}
- uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 #v3.16.2
with:
status: ${{ job.status }}
fields: workflow,eventName,job
text: Grype-DB generated code update failed
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
if: ${{ failure() && env.SLACK_NOTIFICATIONS == 'true' }}