Skip to content

Commit

Permalink
ci(GitHub-Actions): Call slack-templates workflows
Browse files Browse the repository at this point in the history
Eliminate duplication of identical Notify Assignee, Notify Reviewers,
and Bump Version workflows across repositories now that slack-templates
houses callable versions.
  • Loading branch information
Kurt-von-Laven committed Apr 25, 2022
1 parent 30e2a61 commit 1290597
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 36 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,7 @@ on:
jobs:
bump-version:
name: Bump Version
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-20.04
steps:
- name: Check out repository.
uses: actions/checkout@v3.0.2
with:
fetch-depth: 0
- name: Push a commit to main to bump version and update changelog.
uses: commitizen-tools/commitizen-action@0.12.0
with:
branch: main
git_name: commitizen-github-action[bot]
git_email: commitizen-github-action[bot]@users.noreply.github.com
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Send Slack notification with job status.
uses: ScribeMD/slack-templates@0.2.3
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ secrets.SLACK_ACTIONS_CHANNEL_ID }}
template: result
uses: ScribeMD/slack-templates/.github/workflows/bump-version.yaml@0.2.3
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_ACTIONS_CHANNEL_ID: ${{ secrets.SLACK_ACTIONS_CHANNEL_ID }}
12 changes: 4 additions & 8 deletions .github/workflows/notify-assignee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ on:
jobs:
notify-assignee:
name: Notify Assignee
runs-on: ubuntu-20.04
steps:
- name: Send Slack notification assigning pull request.
uses: ScribeMD/slack-templates@0.2.3
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ secrets.SLACK_ASSIGN_CHANNEL_ID }}
template: assignee
uses: ScribeMD/slack-templates/.github/workflows/notify-assignee.yaml@0.2.3
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_ASSIGN_CHANNEL_ID: ${{ secrets.SLACK_ASSIGN_CHANNEL_ID }}
12 changes: 4 additions & 8 deletions .github/workflows/notify-reviewers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ on:
jobs:
notify-reviewers:
name: Notify Reviewers
runs-on: ubuntu-20.04
steps:
- name: Send Slack notification requesting code review.
uses: ScribeMD/slack-templates@0.2.3
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ secrets.SLACK_REVIEW_CHANNEL_ID }}
template: reviewers
uses: ScribeMD/slack-templates/.github/workflows/notify-reviewers.yaml@0.2.3
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_REVIEW_CHANNEL_ID: ${{ secrets.SLACK_REVIEW_CHANNEL_ID }}

0 comments on commit 1290597

Please sign in to comment.