Skip to content

Use a custom release workflow/target #2

Use a custom release workflow/target

Use a custom release workflow/target #2

Workflow file for this run

# Credit: https://github.com/DataDog/helm-charts/blob/main/.github/workflows/release.yaml
name: Release Charts
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
helm-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update PATH
run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Generate package archives
run: |
cd charts
helm package vector
# Helm Release
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- name: 'Set up Cloud SDK'
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Download current index from Google Cloud
env:
GCP_HELM_BUCKET_NAME: ${{ secrets.GCP_HELM_BUCKET_NAME }}
run: |
echo "Downloading index.yaml from gs://$GCP_HELM_BUCKET_NAME/vector/index.yaml"
gsutil cp gs://$GCP_HELM_BUCKET_NAME/vector/index.yaml ./charts
- name: Regenerate Helm index
env:
GCP_HELM_BUCKET_NAME: ${{ secrets.GCP_HELM_BUCKET_NAME }}
run: |
echo "Generating Helm index for gs://$GCP_HELM_BUCKET_NAME/vector/index.yaml"
cd charts
helm repo index . --merge index.yaml --url "https://$GCP_HELM_BUCKET_NAME/vector/"
- name: Upload packages and index
env:
GCP_HELM_BUCKET_NAME: ${{ secrets.GCP_HELM_BUCKET_NAME }}
run: |
cd charts
gsutil cp *.tgz gs://$GCP_HELM_BUCKET_NAME/vector/
gsutil cp index.yaml gs://$GCP_HELM_BUCKET_NAME/vector/