Skip to content

Commit

Permalink
Check for md files only and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TRohit20 committed Feb 16, 2024
1 parent 2dc56fd commit f664294
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/notify-docs-triagers.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
name: Notify Docs-triagers

on:
pull_request:
push:
branches:
- master

jobs:
Notify-triagers:
runs-on: ubuntu-latest
steps:
- name: Check PR Changes
id: pr-changes
run: echo "::set-output name=changes::${{ toJson(github.event.pull_request.changed_files) }}"
- name: Check PR Changes
id: pr-changes
run: |
md_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.md$' || true)
echo "::set-output name=md_changes::${md_files}"
- name: Create Comment
if: steps.pr-changes.outputs.changes != '[]'
uses: mshick/[email protected]
with:
message: "This is a test comment to check workflow"
repo-token: ${{secrets.GH_TOKEN}}
- name: Create Comment
if: steps.pr-changes.outputs.md_changes != ''
uses: mshick/[email protected]
with:
message: "This is a test comment to check workflow for changes to Markdown files."
repo-token: ${{ secrets.GH_TOKEN }}

0 comments on commit f664294

Please sign in to comment.