Add workflow for scheduling releases on maintenance branches

Closes gh-11180
This commit is contained in:
Steve Riesenberg 2022-05-04 14:05:14 -05:00 committed by Steve Riesenberg
parent 2c93a92afa
commit ad19fc1330
2 changed files with 32 additions and 5 deletions

29
.github/workflows/release-scheduler.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Release Scheduler
on:
schedule:
- cron: '15 15 * * MON' # Every Monday at 3:15pm UTC
workflow_dispatch:
jobs:
dispatch_scheduled_releases:
name: Dispatch scheduled releases
if: ${{ github.repository == 'spring-projects/spring-security' }}
strategy:
matrix:
#
# List of active maintenance branches.
#
branch:
- 'main'
- '5.8.x'
- '5.7.x'
- '5.6.x'
runs-on: ubuntu-latest
env:
TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: spring-io/spring-gradle-build-action@v1
- name: Trigger release workflow
run: ./gradlew dispatchGitHubWorkflow -Pbranch=${{ matrix.branch }} -PworkflowId=update-scheduled-release-version.yml -PgitHubAccessToken=$TOKEN

View File

@ -1,9 +1,7 @@
name: Release Next Version
name: Update Scheduled Release Version
on:
schedule:
- cron: '0 17 * * MON' # Every Monday at 5pm UTC
workflow_dispatch: # Manual trigger
workflow_dispatch: # Manual trigger only. Triggered by release-scheduler.yml on main.
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
@ -12,7 +10,7 @@ env:
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
jobs:
release-next-version:
update_scheduled_release_version:
name: Initiate Release If Scheduled
if: ${{ github.repository == 'spring-projects/spring-security' }}
runs-on: ubuntu-latest