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