Skip to content

Commit 6464a0c

Browse files
committed
Cache list of namespace READMEs
1 parent b8ff1e5 commit 6464a0c

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

.github/workflows/markdown_tocs.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ on:
2727
# Workflow jobs:
2828
jobs:
2929

30-
# Define a job for updating namespace table of contents in README.md files...
30+
# Define a job for updating namespace table of contents...
3131
update:
3232

3333
# Define a display name:
34-
name: 'Update table of contents in README.md files'
34+
name: 'Update namespace ToCs'
3535

3636
# Define the type of virtual host machine:
3737
runs-on: ubuntu-latest
@@ -66,34 +66,36 @@ jobs:
6666
make install-node-modules || make install-node-modules || make install-node-modules
6767
timeout-minutes: 15
6868

69-
# Initialize stdlib development environment:
70-
- name: 'Initialize stdlib development environment'
69+
# Initialize development environment:
70+
- name: 'Initialize development environment'
7171
run: |
72-
make init || make init || make init
72+
make init
7373
timeout-minutes: 5
7474

75-
# Update namespace table of contents in README.md files:
75+
# Generate list of namespace READMEs:
76+
- name: 'Generate list of namespace READMEs'
77+
run: |
78+
echo "::set-output name=files::$( make list-pkgs-namespaces | sed 's/.*/lib\/node_modules\/&\/README.md/' | tr '\n' ' ' )"
79+
id: namespace_files
80+
81+
# Update namespace table of contents:
7682
- name: 'Update tables of contents'
7783
run: |
78-
make markdown-namespace-tocs-files FILES="$( make list-pkgs-namespaces | sed 's/.*/lib\/node_modules\/&\/README.md/' | tr '\n' ' ' )"
79-
make markdown-pkg-urls-files FILES="$( make list-pkgs-namespaces | sed 's/.*/lib\/node_modules\/&\/README.md/' | tr '\n' ' ' )"
84+
make markdown-namespace-tocs-files FILES="${{ steps.namespace_files.outputs.files }}"
85+
make markdown-pkg-urls-files FILES="${{ steps.namespace_files.outputs.files }}"
8086
timeout-minutes: 15
8187

8288
# Create a pull request with the updated tables of contents:
8389
- name: 'Create pull request'
8490
uses: peter-evans/create-pull-request@v3
8591
with:
86-
title: 'Update namespace table of contents in README.md files'
92+
title: 'Update namespace table of contents'
8793
body: |
8894
This PR
8995
90-
- updates namespace table of contents in README.md files
91-
92-
* * *
93-
94-
@stdlib-js/reviewers
96+
- updates namespace table of contents
9597
96-
commit-message: 'Update namespace table of contents in README.md files'
98+
commit-message: 'Update namespace table of contents'
9799
committer: 'stdlib-bot <[email protected]>'
98100
labels: |
99101
documentation

0 commit comments

Comments
 (0)