-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: "Bump python package versions" | ||
description: "Bumps versions of python packages if changes since a given commit are detected." | ||
inputs: | ||
ci_bot_email: | ||
description: email to use as author of the commit | ||
required: false | ||
ci_bot_name: | ||
description: Name to use as author of the commit | ||
required: false | ||
directory: | ||
description: The directory in source to filter the python packages by | ||
required: false | ||
runs: | ||
using: "composite" | ||
steps: | ||
- | ||
name: Bump python package versions | ||
shell: bash | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
if [ -z "${{ inputs.directory }}" ]; then | ||
PY_PACKAGE_VERSION_UPDATES=$(bash ./scripts/bump_py_package_versions.sh --changed-since=${{ github.event.pull_request.base.sha }} --base-branch=${{ github.event.pull_request.base.ref }}) | ||
else | ||
PY_PACKAGE_VERSION_UPDATES=$(bash ./scripts/bump_py_package_versions.sh --changed-since=${{ github.event.pull_request.base.sha }} --base-branch=${{ github.event.pull_request.base.ref }} --filter-address-regex=src/${{ inputs.directory }}) | ||
fi | ||
if [ -z "$PY_PACKAGE_VERSION_UPDATES" ]; then | ||
echo "No python package version changes detected." | ||
else | ||
echo "## Python package version changes detected:" >> pr-comment.txt | ||
echo "$PY_PACKAGE_VERSION_UPDATES" >> pr-comment.txt | ||
cat pr-comment.txt >> $GITHUB_STEP_SUMMARY | ||
fi | ||
- | ||
name: Comment version changes on PR | ||
if: ${{ hashFiles('pr-comment.txt') != '' }} | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
path: pr-comment.txt | ||
- | ||
name: Commit and Push | ||
if: ${{ hashFiles('pr-comment.txt') != '' }} | ||
shell: bash | ||
run: | | ||
git checkout ${{ github.event.pull_request.head.ref }} | ||
shopt -s globstar # enable recursive globbing | ||
git config --global user.email ${{ inputs.ci_bot_email }} | ||
git config --global user.name ${{ inputs.ci_bot_name }} | ||
git add **/BUILD | ||
git commit -m "chore: bump python package versions" | ||
git push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Bump Python Package Versions | ||
|
||
A GitHub action that checks for Docker version updates and bumps the version number accordingly based on past commit messages. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: publish docker CD | |
|
||
env: | ||
DOCKERREPO: seblum/octivbooker | ||
TAG: v1.4.2 | ||
TAG: v1.4.3 | ||
|
||
on: | ||
push: | ||
|