Skip to content

Commit

Permalink
CLOUDP-226369: Allow backport releases
Browse files Browse the repository at this point in the history
Signed-off-by: jose.vazquez <[email protected]>
  • Loading branch information
josvazg committed Feb 5, 2024
1 parent 2fcc060 commit be17843
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/actions/releaser/cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ set -o errexit
set -o nounset
set -o pipefail

set -x

main() {
local version=${VERSION:-v1.2.1}
local charts_dir=${CHART_DIR:-charts}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
- '.github/**'
workflow_dispatch:
inputs:
backport-branch:
description: "Select backport branch if different from 'main'"
type: string
default: "main"
required: true
target:
description: "target chart to release"
type: string
Expand All @@ -22,10 +27,20 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
BACKPORT_BRANCH: ${{ github.event.inputs.backport-branch || 'main' }}
CHARTS_DIR: ${{ github.event.inputs.backport-branch == 'main' && 'charts' || 'backports-checkout/charts' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout Backport branch
uses: actions/checkout@v4
if: github.event.inputs.backport-branch != 'main'
with:
ref: ${{ env.BACKPORT_BRANCH }}
path: backport-checkout

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
Expand Down Expand Up @@ -68,3 +83,4 @@ jobs:
charts_repo_url: https://mongodb.github.io/helm-charts
target: ${{ github.event.inputs.target }}
dryrun: ${{ github.event.inputs.dryrun }}
charts_dir: ${{ env.CHARTS_DIR }}

0 comments on commit be17843

Please sign in to comment.