update code owner [skip-ci] #107
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: new-post | |
on: | |
pull_request: | |
types: [opened, reopened, edited, labeled] | |
jobs: | |
notify-if-blog-post: | |
if: github.event.pull_request.draft == false && (startsWith(github.event.pull_request.title, 'Post') || contains(github.event.pull_request.labels.*.name, 'post')) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: loadsmart/github-actions/.github/actions/read-blog-post-content@master | |
name: Read blog post content from Markdown | |
id: read-blog-post-content | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: loadsmart/github-actions/.github/actions/notify-of-new-blog-post-to-review@master | |
name: Send Slack notification with preview of the post | |
with: | |
title: ${{ steps.read-blog-post-content.outputs.title }} | |
author: ${{ steps.read-blog-post-content.outputs.author }} | |
date: ${{ steps.read-blog-post-content.outputs.date }} | |
body: ${{ steps.read-blog-post-content.outputs.body }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |