Removed duplicated workflow start condition #3
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: Patch version increment | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
version-update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: false | |
- name: Increment version | |
run: | | |
cd model/version | |
OLD_VERSION=$(ls) | |
FIRST_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 1) | |
SECOND_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 2) | |
THIRD_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 3) | |
NEW_THIRD_DIGIT=$((THIRD_DIGIT+1)) | |
NEW_VERSION=$FIRST_DIGIT.$SECOND_DIGIT.$NEW_THIRD_DIGIT | |
echo \"$OLD_VERSION\" | |
echo \"$NEW_VERSION\" | |
echo `pwd` | |
mv ./$OLD_VERSION ./$NEW_VERSION | |
cd ../.. | |
- name: Commit incremented version | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Increment version [ci skip] | |
build: | |
needs: version-update | |
uses: ./.github/workflows/docker-image-update.yml |