Skip to content

Commit

Permalink
Add weekly bump
Browse files Browse the repository at this point in the history
  • Loading branch information
almahmoud committed Dec 17, 2024
1 parent 35210c6 commit 9abf028
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/weekly-release-bump.yaml
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 }}

0 comments on commit 9abf028

Please sign in to comment.