Skip to content

added space

added space #6

Workflow file for this run

#############################################################################
# GitHub Action to bump build number
#
#############################################################################
name: "Bump build number on OS branch push"
on:
push:
branches:
- 'dev_sonoma_compscript'
# - '!dev*'
# - '!main'
jobs:
bump:
name: Bump build
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Update VERSION.yaml with newest build number
id: new_build
run: |
CURRENT_BUILD=$(awk '/^build/ { print $NF }' VERSION.yaml)
if [[ -z $CURRENT_BUILD ]];then
echo "build: 1" >> VERSION.yaml
echo "NEWBUILD=1" >> $GITHUB_OUTPUT
else
NEW_BUILD=$((CURRENT_BUILD+1))
echo "$NEW_BUILD"
echo "NEWBUILD=$NEW_BUILD" >> $GITHUB_OUTPUT
sed -i "s/^build.*/build: $NEW_BUILD/" VERSION.yaml
fi
- name: Push commit
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add VERSION.yaml
git commit -am "minor: Bump build to ${{ steps.new_build.outputs.NEWBUILD }}"
git push