Skip to content

ci: release charts to ACR #149

ci: release charts to ACR

ci: release charts to ACR #149

Workflow file for this run

name: Release Charts
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
paths-ignore:
- 'docs/**'
- '**.md'
- '.gitignore'
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
- '.gitignore'
workflow_dispatch:
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]
with:
version: v3.12.1
- 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
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.12.1
- 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-charts-to-acr.sh
release-charts-to-s3:
needs: [
release,
]
runs-on: ubuntu-latest
steps:
- 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-charts-to-s3.sh ${{ vars.AWS_RELEASE_BUCKET }}