File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow is stored and called from each repository that contains documentation files
2+ name : call-refresh-doc
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ compare :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+
14+ - name : Get changed files
15+ id : changed-files
16+ uses : tj-actions/changed-files@v19
17+ with :
18+ files : |
19+ docs/**/*.md
20+ docs/**/*.mdx
21+
22+ # --- Log all diff info ---
23+ - name : Log the files commit SHA if any md/mdx files have diffs
24+ continue-on-error : true
25+ if : steps.changed-files.outputs.any_modified == 'true'
26+ run : |
27+ for file in ${{ steps.changed-files.outputs.all_modified_files }}; do
28+ echo "$file was modified" with the commit ${{ github.sha }}
29+ done
30+ for file in ${{ steps.changed-files.outputs.added_files }}; do
31+ echo "$file was added"
32+ done
33+ for file in ${{ steps.changed-files.outputs.deleted_files }}; do
34+ echo "$file was deleted"
35+ done
36+ for file in ${{ steps.changed-files.outputs.all_modified_files }}; do
37+ echo "$file was modified"
38+ done
39+ outputs :
40+ all_modified_files : ${{ steps.changed-files.outputs.all_modified_files }}
41+ any_modified : ${{ steps.changed-files.outputs.any_modified }}
42+
43+ # --- If modified, call refresh ---
44+ call-refresh-workflow-passing-data :
45+ needs : compare
46+ if : ${{ needs.compare.outputs.all_modified_files != 0 }}
47+ uses : onflow/flow/.github/workflows/refresh-doc.yml@master
48+ with :
49+ contentPaths : ${{ needs.compare.outputs.all_modified_files }}
50+ repository : ${{ github.event.repository.name }}
51+ commitSha : ${{ github.sha }}
52+
You can’t perform that action at this time.
0 commit comments