Skip to content

Commit

Permalink
Update action to use yb_release_train variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jharveysmith committed Oct 19, 2020
1 parent 26782b1 commit e10a81b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
repository_dispatch:
types:
- update-on-release
env:
CURRENT_STABLE: 2.3
jobs:
update-version:
if: github.event.client_payload.prerelease == 'false'
Expand Down Expand Up @@ -34,14 +32,11 @@ jobs:
echo "Extracted the version number '${version_number}'."
echo "::set-output name=yb_version::${version_number}"
- name: "Switch to correct branch"
id: extract-branch
id: switch-branch
run: |
rel=${{steps.extract-version.outputs.yb_version}}
a=( ${rel//./ } )
branch_name="${a[0]}.${a[1]}"
if [[ "${branch_name}" == "${CURRENT_STABLE}" ]]; then # 2.3 is the latest "master" release
branch_name='master'
fi
# We use the yb_release_train as the branch in this repo
# This allows us to map multiple '2.2' release branches to a single set of helm charts
branch_name="${{github.events.client_payload.yb_release_train}}"
if git branch | grep -qE "^${branch_name}$"; then
# branch already exists so check it out
git checkout ${branch_name}
Expand Down

0 comments on commit e10a81b

Please sign in to comment.