File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 22# SPDX-FileCopyrightText: 2025 Intel Corporation
33# SPDX-License-Identifier: Apache-2.0
44name : Bump Version
5- # Calling workflow should include "secrets: inherit"
5+ # Reads the contents of the VERSION file, increments the patch version,
6+ # appends '-dev' suffix, writes it back to the VERSION file, and creates a
7+ # pull request with the updated VERSION file.
8+ # Assumes that the VERSION file is in the format: MAJOR.MINOR.PATCH
9+ # Example: 1.2.3 -> 1.2.4-dev
10+ # The calling workflow should include "secrets: inherit" to pass the GITHUB_TOKEN.
611
712on :
813 workflow_call :
9- inputs :
10- version :
11- required : true
12- type : string
1314
1415jobs :
1516 bump-version :
2021 fetch-depth : 0
2122 - name : increment version
2223 run : |
23- IFS='.' read -r major minor patch <<< ${{ inputs.version }}
24+ IFS='.' read -r major minor patch <<< $(cat VERSION)
2425 patch_update=$((patch+1))
2526 NEW_VERSION="$major.$minor.$patch_update-dev"
2627 echo $NEW_VERSION > VERSION
2930 - name : Create Pull Request
3031 uses : peter-evans/create-pull-request@v7
3132 with :
32- token : ${{ secrets.GH_ONOS_PAT }}
33+ token : ${{ secrets.GITHUB_TOKEN }}
3334 commit-message : Update version
3435 committer : github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3536 signoff : true
You can’t perform that action at this time.
0 commit comments