Skip to content

Commit

Permalink
feat(build): publish OpenVEX documents for new releases
Browse files Browse the repository at this point in the history
  • Loading branch information
npdgm committed Dec 16, 2024
1 parent 1267a89 commit 1ed09e5
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/openvex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: OpenVEX

on:
workflow_dispatch:
release:
types:
- released

permissions:
contents: read

jobs:
vexctl:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set environment variables
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Run vexctl
uses: openvex/generate-vex@c59881b41451d7ccba5c3b74cd195382b8971fcd
# Refer: https://github.com/openvex/vexctl#operational-model
with:
product: pkg:golang/github.com/enix/x509-certificate-exporter/v3@${{ env.RELEASE_VERSION }}
file: x509-certificate-exporter.openvex.json

- name: Upload OpenVEX document to GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ env.RELEASE_VERSION }} x509-certificate-exporter.openvex.json

0 comments on commit 1ed09e5

Please sign in to comment.