Update pytests (#207) #10
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
name: After master commit | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
check-version-level-and-update: | |
if: github.repository == 'oncokb/oncokb-annotator' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: 'Update Version Level' | |
run: | | |
git pull | |
VERSION_LEVEL=$(cat .version-level | tr "[:upper:]" "[:lower:]") | |
RELEASE_DRAFTER_MINOR='NEXT_MINOR_VERSION' | |
RELEASE_DRAFTER_PATCH='NEXT_PATCH_VERSION' | |
if [[ $VERSION_LEVEL == 'minor' ]]; then | |
sed -i "s/$RELEASE_DRAFTER_PATCH/$RELEASE_DRAFTER_MINOR/gi" .github/release-drafter.yml | |
fi | |
if [[ $VERSION_LEVEL == 'patch' ]]; then | |
sed -i "s/$RELEASE_DRAFTER_MINOR/$RELEASE_DRAFTER_PATCH/gi" .github/release-drafter.yml | |
fi | |
CHANGED=$(git diff --name-only HEAD --) | |
if [ -n "$CHANGED" ] | |
then | |
git config user.name oncokb-bot | |
git config user.email [email protected] | |
git add . | |
git commit -m "Update action files to align the version level to $VERSION_LEVEL" | |
git push | |
fi |