Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish openvex on release #2398

Merged
merged 4 commits into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/openvex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,35 @@ name: openvex
on:
workflow_dispatch:
release:
types: [published]
types:
- released

permissions:
contents: read

jobs:
vexctl:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

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

- uses: openvex/generate-vex@c59881b41451d7ccba5c3b74cd195382b8971fcd
# Refer: https://github.com/openvex/vexctl#operational-model
name: Run vexctl
with:
product: pkg:golang/k8s.io/kube-state-metrics/v2@${{ env.RELEASE_VERSION }}
file: kube-state-metrics.openvex.json

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