From 9abf028a7e783b6e58dfc65584f8b6716c4b4e7b Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Tue, 17 Dec 2024 15:55:38 -0500 Subject: [PATCH] Add weekly bump --- .github/workflows/weekly-release-bump.yaml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/weekly-release-bump.yaml diff --git a/.github/workflows/weekly-release-bump.yaml b/.github/workflows/weekly-release-bump.yaml new file mode 100644 index 0000000..2af938c --- /dev/null +++ b/.github/workflows/weekly-release-bump.yaml @@ -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 }} \ No newline at end of file