-
Notifications
You must be signed in to change notification settings - Fork 31
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
1 changed file
with
35 additions
and
0 deletions.
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,35 @@ | ||
name: Weekly Release Patch Bump | ||
|
||
on: | ||
schedule: | ||
- cron: '0 6 * * 1' # 2 AM EST (UTC-4) on Monday mornings | ||
workflow_dispatch: | ||
|
||
jobs: | ||
bump-patch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Find Latest Release Branch | ||
id: find-branch | ||
run: | | ||
latest_version=$(git branch -r | grep 'origin/RELEASE_' | sed 's|origin/||' | grep -oP 'RELEASE_\K\d+_\d+' | sort -Vr | head -n1) | ||
latest_branch="RELEASE_${latest_version//_/.}" | ||
echo "Detected latest release branch: $latest_branch" | ||
echo "branch=$latest_branch" >> $GITHUB_OUTPUT | ||
- name: Run patch bump script and push | ||
run: | | ||
git checkout ${{ steps.find-branch.outputs.branch }} | ||
sed -r -i 's/(^ARG BIOCONDUCTOR_PATCH=)([0-9]+)$/echo "\1$((\2+1))"/ge' Dockerfile | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git add Dockerfile | ||
git commit -m "Weekly auto-bump Dockerfile patch version for latest release" || exit 0 | ||
git push origin ${{ steps.find-branch.outputs.branch }} |