Skip to content

Commit

Permalink
Fix typo, grab all git history, make calcualted branch name available…
Browse files Browse the repository at this point in the history
… to the entire workflow
  • Loading branch information
jharveysmith committed Oct 19, 2020
1 parent c598abd commit 26782b1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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 @@ -33,6 +34,7 @@ jobs:
echo "Extracted the version number '${version_number}'."
echo "::set-output name=yb_version::${version_number}"
- name: "Switch to correct branch"
id: extract-branch
run: |
rel=${{steps.extract-version.outputs.yb_version}}
a=( ${rel//./ } )
Expand All @@ -41,13 +43,17 @@ jobs:
branch_name='master'
fi
if git branch | grep -qE "^${branch_name}$"; then
# branch laready exists so check it out
# 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 @@ -65,7 +71,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
- name: "Show git status in case of failure"
if: steps.update-version.outcome == 'failure'
run: |
Expand Down

0 comments on commit 26782b1

Please sign in to comment.