Docs workflolw #8
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: 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: | |
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}', join(steps.changed-files.outputs.enterprise_added_files, '<br>')) || '' }} | |
${{ steps.changed-files.outputs.enterprise_modified_files != '' && format('Files modified:<br><br>{0}', join(steps.changed-files.outputs.enterprise_modified_files, '<br>')) || '' }} | |
${{ 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}', join(steps.changed-files.outputs.stable_added_files, '<br>')) || '' }} | |
${{ steps.changed-files.outputs.stable_modified_files != '' && format('Files modified:<br><br>{0}', join(steps.changed-files.outputs.stable_modified_files, '<br>')) || '' }} | |
${{ 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}', join(steps.changed-files.outputs.test_added_files, '<br>')) || '' }} | |
${{ steps.changed-files.outputs.test_modified_files != '' && format('Files modified:<br><br>{0}', join(steps.changed-files.outputs.test_modified_files, '<br>')) || '' }} | |
Notifying the following about changes to the trains: | |
${{ env.accounts_to_notify }} |