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 db04b24
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 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,25 @@ 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: Debug
run: |
echo "BACKPORT_BRANCH=${{ env.BACKPORT_BRANCH}}"
echo "CHARTS_DIR=${{ env.CHARTS_DIR}}"
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
Expand Down Expand Up @@ -68,3 +88,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 db04b24

Please sign in to comment.