From 28275730a059595fcf65a757737a98070852586a Mon Sep 17 00:00:00 2001 From: Kurt von Laven Date: Sun, 24 Apr 2022 13:17:03 -0700 Subject: [PATCH] ci(GitHub-Actions): Call slack-templates workflows Eliminate duplication of identical Notify Assignee, Notify Reviewers, and Bump Version workflows across repositories now that slack-templates houses callable versions. --- .github/workflows/bump-version.yaml | 24 ++++-------------------- .github/workflows/notify-assignee.yaml | 12 ++++-------- .github/workflows/notify-reviewers.yaml | 12 ++++-------- 3 files changed, 12 insertions(+), 36 deletions(-) diff --git a/.github/workflows/bump-version.yaml b/.github/workflows/bump-version.yaml index cd16de1..8878e1f 100644 --- a/.github/workflows/bump-version.yaml +++ b/.github/workflows/bump-version.yaml @@ -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 }} diff --git a/.github/workflows/notify-assignee.yaml b/.github/workflows/notify-assignee.yaml index 0027f6d..3fe8cc9 100644 --- a/.github/workflows/notify-assignee.yaml +++ b/.github/workflows/notify-assignee.yaml @@ -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 }} diff --git a/.github/workflows/notify-reviewers.yaml b/.github/workflows/notify-reviewers.yaml index 4fbff19..b9b7919 100644 --- a/.github/workflows/notify-reviewers.yaml +++ b/.github/workflows/notify-reviewers.yaml @@ -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 }}