-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Slack notification step optional
* Simply some `if:` expressions * Document how to run release workflow * Add `on: schedule:` example * Add warning into docs about nested reusable workflow levels
- Loading branch information
1 parent
b97ad92
commit 3231d7b
Showing
5 changed files
with
48 additions
and
16 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
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
|
||
secrets: | ||
SPRING_RELEASE_SLACK_WEBHOOK_URL: | ||
required: true | ||
required: false | ||
GH_ACTIONS_REPO_TOKEN: | ||
required: true | ||
|
||
|
@@ -52,13 +52,14 @@ jobs: | |
gh api -X PATCH repos/$GITHUB_REPOSITORY/milestones/$MILESTONE_ID -f state='closed' --silent | ||
fi | ||
# - name: Announce Release on Slack | ||
# uses: slackapi/[email protected] | ||
# env: | ||
# SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }} | ||
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
# with: | ||
# payload: | | ||
# { | ||
# "text": "${{ github.event.repository.name }}-announcing `${{ env.MILESTONE }}`" | ||
# } | ||
- name: Announce Release on Slack | ||
uses: slackapi/[email protected] | ||
if: env.SLACK_WEBHOOK_URL | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
with: | ||
payload: | | ||
{ | ||
"text": "${{ github.event.repository.name }}-announcing `${{ env.MILESTONE }}`" | ||
} |
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
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
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,19 @@ | ||
name: Release Scheduler | ||
on: | ||
schedule: | ||
- cron: '15 15 * * MON' # Every Monday at 3:15pm UTC | ||
|
||
jobs: | ||
dispatch_scheduled_releases: | ||
strategy: | ||
matrix: | ||
# List of active maintenance branches. | ||
branch: [ main, 6.1.x, 6.0.x, 5.8.x ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Dispatch | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} | ||
run: gh workflow run release.yml -r ${{ matrix.branch }} |