From d03c39bd9ebdb004eb6637444ef19ae8a82abfc7 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Wed, 30 Nov 2022 11:50:35 -0500 Subject: [PATCH] Add push to github-sig-core channel --- .../workflows/mattermost-channel-posts.yml | 44 +++++++++++++++++++ .../mm-dev-notifications-webhook.yml | 32 -------------- 2 files changed, 44 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/mattermost-channel-posts.yml delete mode 100644 .github/workflows/mm-dev-notifications-webhook.yml diff --git a/.github/workflows/mattermost-channel-posts.yml b/.github/workflows/mattermost-channel-posts.yml new file mode 100644 index 000000000..0ab6351b6 --- /dev/null +++ b/.github/workflows/mattermost-channel-posts.yml @@ -0,0 +1,44 @@ +name: mattermost-ziti-webhook +on: + issues: + issue_comment: + pull_request_review: + types: [ submitted ] + pull_request_review_comment: + pull_request: + types: [ opened, reopened, ready_for_review, closed ] + fork: + release: + types: [ released ] + workflow_dispatch: + +jobs: + send-notifications: + runs-on: ubuntu-latest + name: POST Webhook + if: github.actor != 'dependabot[bot]' + steps: + - uses: openziti/ziti-mattermost-action-py@main + if: | + github.repository_owner == 'openziti' + && ((github.event_name != 'pull_request_review') + || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')) + with: + zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} + webhookUrl: ${{ secrets.ZHOOK_URL }} + eventJson: ${{ toJson(github.event) }} + senderUsername: "GitHubZ" + destChannel: "dev-notifications" + + - uses: openziti/ziti-mattermost-action-py@main + if: | + github.repository_owner == 'openziti' + && ((github.event_name != 'pull_request_review') + || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')) + with: + zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} + webhookUrl: ${{ secrets.ZHOOK_URL }} + eventJson: ${{ toJson(github.event) }} + senderUsername: "GitHubZ" + destChannel: "github-sig-core" + diff --git a/.github/workflows/mm-dev-notifications-webhook.yml b/.github/workflows/mm-dev-notifications-webhook.yml deleted file mode 100644 index 403d28fcd..000000000 --- a/.github/workflows/mm-dev-notifications-webhook.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: mattermost-ziti-webhook -on: - issues: - issue_comment: - pull_request_review: - types: [submitted] - pull_request_review_comment: - pull_request: - push: - fork: - release: - types: [released] - workflow_dispatch: - -jobs: - mattermost-ziti-webhook: - runs-on: ubuntu-latest - name: POST Webhook - if: github.actor != 'dependabot[bot]' - steps: - - uses: openziti/ziti-mattermost-action-py@main - if: | - github.repository_owner == 'openziti' - && ((github.event_name != 'pull_request_review') - || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')) - with: - zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} - webhookUrl: ${{ secrets.ZHOOK_URL }} - eventJson: ${{ toJson(github.event) }} - senderUsername: "GitHubZ" - destChannel: "dev-notifications" -