Skip to content

Include the email template in the event message (#3756) #2451

Include the email template in the event message (#3756)

Include the email template in the event message (#3756) #2451

Workflow file for this run

# Post-submit and daily build and publish of the Helm chart and Docker container
# This is a separate workflow than image-build.yml because image-build.yml is
# run in the PR context, and those runs aren't allowed package:write permissions if
# the source is a fork(GitHub errors and invalidates the entire workflow if you try).
name: Publish Helm Chart
on:
push:
branches:
- main
schedule:
# Weekdays at noon GMT
- cron: '00 12 * * 1-5'
jobs:
check-helm:
name: Build Helm chart
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write # To sign the provenance.
env:
BASE_REPO: "ghcr.io/stacklok/minder"
steps:
- name: Install Cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: 'go.mod'
- uses: ko-build/setup-ko@3aebd0597dc1e9d1a26bcfdb7cbeb19c131d3037 # v0.7
- uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: v3.12.2
- name: Compute version number
id: version-string
run: |
DATE="$(date +%Y%m%d)"
COMMIT="$(git rev-parse --short HEAD)"
echo "tag=0.$DATE.$GITHUB_RUN_NUMBER+ref.$COMMIT" >> "$GITHUB_OUTPUT"
- name: Build images and Helm Chart
run: |
KO_DOCKER_REPO=$BASE_REPO make helm
env:
KO_PUSH_IMAGE: "true"
HELM_PACKAGE_VERSION: "${{ steps.version-string.outputs.tag }}"
- name: Helm Login
# ko can pick up tokens ambiently from the GitHub Actions environment, but
# Helm needs explicit login
run: |
helm registry login $BASE_REPO --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }}
- name: Push Helm Chart
run: |
cd deployment/helm
helm push minder-*.tgz oci://$BASE_REPO/helm
- name: Sign the published helm chart and ko image
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: |
# Sign the ko image
cosign sign --yes $BASE_REPO/server
# Sign the helm chart
cosign sign --yes $BASE_REPO/helm/minder:$(echo "${{ steps.version-string.outputs.tag }}" | sed 's/+/_/g')