Skip to content

Commit

Permalink
Automatically create PR for version bump-up (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
gab-arrobo authored Mar 29, 2024
1 parent dd8427b commit fedb0b4
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,35 @@ jobs:
remote_user: ${{ secrets.JENKINS_USERNAME }}
remote_key: ${{ secrets.JENKINS_SSHKEY }}
remote_key_pass: ${{ secrets.JENKINS_PASSPHRASE }}

update-version:
runs-on: ubuntu-latest
needs: tag-github
if: needs.tag-github.outputs.changed == 'true'
steps:
- uses: actions/checkout@v4

- name: Increment version
run: |
version=${{ needs.tag-github.outputs.version }}
IFS='.' read -r major minor patch <<< "$version"
minor_update=$((minor+1))
NEW_VERSION="$major.$minor_update.$patch-dev"
echo $NEW_VERSION > VERSION
echo "Updated version: $NEW_VERSION"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_OMEC_PAT }}
commit-message: Update version
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: version-update
delete-branch: true
title: Update version
body: |
Update VERSION file
add-paths: |
VERSION

0 comments on commit fedb0b4

Please sign in to comment.