-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLOUDP-226369: Allow backport releases
Signed-off-by: jose.vazquez <[email protected]>
- Loading branch information
Showing
3 changed files
with
59 additions
and
45 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,45 @@ on: | |
default: "" | ||
required: false | ||
dryrun: | ||
description: "not actually release, but check what would be done" | ||
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]" | ||
|
@@ -42,10 +67,10 @@ jobs: | |
- name: Allow script | ||
run: | | ||
chmod +x ./.github/actions/releaser/cr.sh | ||
chmod +x ./current/.github/actions/releaser/cr.sh | ||
- name: Helm Chart Dependency Releaser | ||
uses: ./.github/actions/releaser | ||
uses: ./current/.github/actions/releaser | ||
if: github.event.inputs.target == '' | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
@@ -55,16 +80,21 @@ jobs: | |
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: ./.github/actions/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 }} |