Skip to content

feat: add Azure Blob storage (#207) #202

feat: add Azure Blob storage (#207)

feat: add Azure Blob storage (#207) #202

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
workflow_dispatch:
inputs:
release-charts-to-acr:
description: Release the Helm charts to ACR
required: false
default: 'false'
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/[email protected]
- name: Add Dependencies
run: |
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: charts
env:
CR_SKIP_EXISTING: true
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
release-charts-to-acr:
runs-on: ubuntu-latest
if: ${{ inputs.release-charts-to-acr == 'true' || github.event_name == 'push' }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/[email protected]
- name: Login to OCI registry
run: echo '${{ secrets.ALICLOUD_PASSWORD }}' | helm registry login ${{ vars.OCI_REGISTRY_URL }} -u ${{ secrets.ALICLOUD_USERNAME }} --password-stdin
- name: Package and push Helm Charts
shell: bash
env:
OCI_REGISTRY_URL: ${{ vars.OCI_REGISTRY_URL }}
OCI_NAMESPACE: ${{ vars.OCI_NAMESPACE }}
run: |
./scripts/release/release-charts-to-acr.sh
release-charts-to-s3:
needs: [
release,
]
runs-on: ubuntu-latest
steps:
# TODO(zyy17): Maybe it's not a elegant way to wait for GitHub Pages to update. For many scenarios, waiting for 5 minutes is enough.
- name: Wait for deployment of GitHub Pages
run: |
sleep 300
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_CN_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_CN_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_RELEASE_BUCKET_REGION }}
- name: Release charts to S3
shell: bash
run: |
./scripts/release/release-charts-to-s3.sh ${{ vars.AWS_RELEASE_BUCKET }}