Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch awareness #35

Merged
merged 3 commits into from
Oct 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
fetch-depth: 1
- name: "Configure git"
run: |
git config user.name 'YugaByte CI'
Expand All @@ -30,6 +31,24 @@ jobs:
fi
echo "Extracted the version number '${version_number}'."
echo "::set-output name=yb_version::${version_number}"
- name: "Switch to correct branch"
id: switch-branch
run: |
# 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}
else
# First time creating charts for this release
# This won't start working 'correctly' till 2.4
# till then, we will need to manually create the new branches and seed them with
# sufficiently old version numbers (the update script won't go down versions)
git checkout -b ${branch_name} origin/master
fi
echo "Extracted the branch: '${branch_name}'"
echo "::set-output name=yb_branch::${branch_name}"
- name: "Check python version and install dependencies"
run: |
python3 --version
Expand All @@ -47,7 +66,7 @@ jobs:
git add ./stable/yugabyte/Chart.yaml ./stable/yugaware/Chart.yaml \
./stable/yugabyte/values.yaml ./stable/yugaware/values.yaml ./stable/yugabyte/app-readme.md
git commit -m "Update the version to ${{steps.extract-version.outputs.yb_version}}"
git push origin ${{ github.ref }}
git push
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be specific, maybe: git push origin HEAD

- name: "Show git status in case of failure"
if: steps.update-version.outcome == 'failure'
run: |
Expand Down