Release Charts #340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Charts | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '.github/**' | |
workflow_dispatch: | |
inputs: | |
target: | |
description: "target chart to release" | |
type: string | |
default: "" | |
required: false | |
dryrun: | |
description: "dry-run" | |
type: boolean | |
default: true | |
required: false | |
backport-branch: | |
description: "Branch or leave empty for current CI branch" | |
type: string | |
default: "" | |
required: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
BACKPORT_BRANCH: ${{ github.event.inputs.backport-branch || '' }} | |
BACKPORT_DIR: 'backport' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: current | |
- name: Checkout Backport branch | |
uses: actions/checkout@v4 | |
if: github.event.inputs.backport-branch != '' | |
with: | |
ref: ${{ env.BACKPORT_BRANCH }} | |
path: ${{ env.BACKPORT_DIR }} | |
- name: Configure Git | |
run: | | |
cd current | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Configure Git for backport | |
if: github.event.inputs.backport-branch != '' | |
run: | | |
cd ${{ env.BACKPORT_DIR }} | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Install Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: v3.13.1 | |
- name: Add Helm repos | |
run: | | |
helm repo add mongodb https://mongodb.github.io/helm-charts | |
- name: Allow script | |
run: | | |
chmod +x ./current/.github/actions/releaser/cr.sh | |
- name: Helm Chart Dependency Releaser | |
uses: ./current/.github/actions/releaser | |
if: github.event.inputs.target == '' | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
charts_repo_url: https://mongodb.github.io/helm-charts | |
target: | | |
atlas-operator-crds | |
community-operator-crds | |
dryrun: ${{ github.event.inputs.dryrun }} | |
work_dir: current | |
- name: Get latest charts from repo | |
run: | | |
helm repo update | |
- name: Helm Chart Releaser | |
uses: ./current/.github/actions/releaser | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
WORK_DIR: ${{ github.event.inputs.backport-branch == '' && 'current' || env.BACKPORT_DIR }} | |
MARK_LATEST: ${{ github.event.inputs.backport-branch == '' && 'true' || 'false' }} | |
with: | |
charts_repo_url: https://mongodb.github.io/helm-charts | |
target: ${{ github.event.inputs.target }} | |
dryrun: ${{ github.event.inputs.dryrun }} | |
work_dir: ${{ env.WORK_DIR }} | |
mark_latest: ${{ env.MARK_LATEST }} |