Create subscribe.yaml
This commit is contained in:
36
.github/workflows/subscribe.yaml
vendored
Normal file
36
.github/workflows/subscribe.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Subscribe to updates
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- '**.md'
|
||||
jobs:
|
||||
subscribe:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
|
||||
|
||||
- name: Changed Files Exporter
|
||||
id: changed-files
|
||||
uses: umani/changed-files@v4.0.0
|
||||
with:
|
||||
repo-token: ${{ github.token }}
|
||||
pattern: '^.*\.(md|markdown)$'
|
||||
|
||||
- name: Get PR labels
|
||||
id: pr-labels
|
||||
uses: joerick/pr-labels-action@v1.0.8
|
||||
|
||||
|
||||
- name: Post
|
||||
uses: dkershner6/post-api-call-action@v1
|
||||
with:
|
||||
url: "https://np4l5e.laf.run/pr"
|
||||
data: "{\"id\": \"github.event.pullrequest.number\",\"labels\":\"{{ github.event.pull_request.number }}\", \"labels\": \"{{ steps.pr-labels.outputs.labels }}\", \"files_updated\": \"steps.changed−files.outputs.filesupdated\",\"filescreated\":\"{{ steps.changed-files.outputs.files_updated }}\", \"files_created\": \"{{ steps.changed-files.outputs.files_created }}\", \"files_deleted\": \"steps.changed−files.outputs.filesdeleted\",\"body\":\"{{ steps.changed-files.outputs.files_deleted }}\",\"body\":\"{{github.event.pull_request.body}}\",\"title\":\"github.event.pullrequest.title\",\"url\":\"{{github.event.pull_request.title}}\",\"url\":\"{{github.event.pull_request.html_url}}\"}"
|
||||
Reference in New Issue
Block a user