1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

Create Workflow for Merge Notifications

Sent to Mattermost Channel for Certbot Team to check and be generally aware of more granular merge events.
This commit is contained in:
Alexis
2023-02-28 13:15:41 -08:00
committed by GitHub
parent 34e6b1e74d
commit 676863760a

24
.github/workflows/merged.yaml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Merge Event
on:
pull_request:
types:
- closed
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Create Mattermost Message
#https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
env:
NUMBER: ${{ github.event.number }}
PR_URL: https://github.com/${{ github.repository }}/pull/${{ github.event.number }}
REPO: ${{ github.repository }}
USER: ${{ github.actor }}
run: |
echo "{\"text\":\"[$REPO] | #[$NUMBER]($PR_URL) was merged into master by $USER.\"}" > mattermost.json
- uses: mattermost/action-mattermost-notify@master
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_MERGE_WEBHOOK }}