Skip to content

Docs workflolw

Docs workflolw #13

name: Notify docs team about train changes
on:
pull_request: {}
env:
accounts_to_notify: |
- @stavros-k
jobs:
notify-teams:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
with:
json: true
files_yaml: |
enterprise:
- ix-dev/enterprise/**
stable:
- ix-dev/stable/**
test:
- ix-dev/test/**
- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
if: ${{
steps.changed-files.outputs.enterprise_added_files != '' ||
steps.changed-files.outputs.enterprise_modified_files != '' ||
steps.changed-files.outputs.stable_added_files != '' ||
steps.changed-files.outputs.stable_modified_files != '' ||
steps.changed-files.outputs.test_added_files != '' ||
steps.changed-files.outputs.test_modified_files != ''
}}
with:
comment-tag: docs-team-comment
message: |
${{ steps.changed-files.outputs.enterprise_added_files != '' || steps.changed-files.outputs.enterprise_modified_files != '' && '## `Enterprise train`' || '' }}
${{ steps.changed-files.outputs.enterprise_added_files != '' && format('Files added:<br><br>{0}', steps.changed-files.outputs.enterprise_added_files_count) || '' }}
${{ steps.changed-files.outputs.enterprise_modified_files != '' && format('Files modified:<br><br>{0}', steps.changed-files.outputs.enterprise_modified_files_count) || '' }}
${{ steps.changed-files.outputs.stable_added_files != '' || steps.changed-files.outputs.stable_modified_files != '' && '## `Stable train`' || '' }}
${{ steps.changed-files.outputs.stable_added_files != '' && format('Files added:<br><br>{0}', steps.changed-files.outputs.stable_added_files_count) || '' }}
${{ steps.changed-files.outputs.stable_modified_files != '' && format('Files modified:<br><br>{0}', steps.changed-files.outputs.stable_modified_files_count) || '' }}
${{ steps.changed-files.outputs.test_added_files != '' || steps.changed-files.outputs.test_modified_files != '' && '## `Test train`' || '' }}
${{ steps.changed-files.outputs.test_added_files != '' && format('Files added:<br><br>{0}', steps.changed-files.outputs.test_added_files_count) || '' }}
${{ steps.changed-files.outputs.test_modified_files != '' && format('Files modified:<br><br>{0}', steps.changed-files.outputs.test_modified_files_count) || '' }}
Notifying the following about changes to the trains:
${{ env.accounts_to_notify }}