Skip to content
Merged
Show file tree
Hide file tree
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
36 changes: 36 additions & 0 deletions .github/workflows/releaser-helm-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
packages: write
id-token: write

outputs:
released_charts: ${{ steps.prepare-matrix.outputs.published_charts_matrix }}

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
Expand Down Expand Up @@ -52,3 +55,36 @@ jobs:
done
env:
COSIGN_EXPERIMENTAL: 1

- name: Prepare Matrix Output
id: prepare-matrix
run: |
# Build JSON array from chart files
json_array="["
first=true
for chart in `find .cr-release-packages -name '*.tgz' -print`; do
file_name=${chart##*/}
release_name=${file_name%.tgz}

if [ "$first" = true ]; then
first=false
else
json_array="${json_array},"
fi
json_array="${json_array}\"${release_name}\""
done
json_array="${json_array}]"
echo "published_charts_matrix=${json_array}" >> $GITHUB_OUTPUT

update-docs-website:
name: Trigger Docs Update
needs: [ release ]
permissions: {}
uses: ./.github/workflows/update-docs-website.yml
strategy:
matrix:
version: ${{ fromJSON(needs.release.outputs.released_charts) }}
with:
version: ${{ matrix.version }}
secrets:
DOCS_REPO_DISPATCH_TOKEN: ${{ secrets.DOCS_REPO_DISPATCH_TOKEN }}
10 changes: 10 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ jobs:
id-token: write
uses: ./.github/workflows/image-build-and-publish.yml

update-docs-website:
name: Trigger Docs Update
needs: [ release ]
permissions: {}
uses: ./.github/workflows/update-docs-website.yml
with:
version: ${{ github.ref_name }}
secrets:
DOCS_REPO_DISPATCH_TOKEN: ${{ secrets.DOCS_REPO_DISPATCH_TOKEN }}

# provenance:
# name: Generate provenance (SLSA3)
# needs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-on-main-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ jobs:
packages: write
id-token: write
uses: ./.github/workflows/releaser-helm-charts.yml
secrets: inherit # So the releaser workflow can pass a token down to the docs update workflow
13 changes: 10 additions & 3 deletions .github/workflows/update-docs-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ name: Trigger Docs Update
permissions: {}

on:
release:
types: [published]
workflow_call:
inputs:
version:
description: 'Version tag for the release'
required: true
type: string
secrets:
DOCS_REPO_DISPATCH_TOKEN:
required: true

jobs:
trigger:
Expand All @@ -15,7 +22,7 @@ jobs:
run: |
repo="stacklok/docs-website"
event_type="published-release"
version="${{ github.event.release.tag_name }}"
version="${{ inputs.version }}"

echo "Triggering docs update for $repo with version $version"

Expand Down
Loading