Skip to content

Weekly Release Patch Bump #6

Weekly Release Patch Bump

Weekly Release Patch Bump #6

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=$(echo "RELEASE_${latest_version}" | sed 's/\./_/g')
echo "Detected latest release branch: $latest_branch"
echo "branch=$latest_branch" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
ref: ${{ steps.find-branch.outputs.branch }}
token: ${{ secrets.PAT }}
- 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 [email protected]
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 }}