Skip to content

Commit 9367bac

Browse files
authored
Automate the generation of the "Explore Platterns" mindmap for multiple languages (#618)
Using a matrix build of the GHA to generate the "Explore Platterns" mindmap for multiple languages in parallel. Also upgrade dependencies (to apply security fixes).
1 parent 591a213 commit 9367bac

7 files changed

+3947
-874
lines changed

.github/workflows/generate-mindmap.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Generate Mindmap
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- "main"
@@ -9,6 +10,7 @@ on:
910
- ".github/workflows/generate-mindmap.yml"
1011
- "pattern-categorization/innersource-program-mind-map.md"
1112
- "pattern-categorization/package.json"
13+
- "pattern-categorization/gl/*"
1214

1315
defaults:
1416
run:
@@ -17,6 +19,11 @@ defaults:
1719
jobs:
1820
generate-mindmap:
1921
runs-on: ubuntu-latest
22+
23+
strategy:
24+
matrix:
25+
folder: [".", "./gl"]
26+
2027
steps:
2128
- uses: actions/checkout@v3
2229
- name: Use Node.js
@@ -28,18 +35,18 @@ jobs:
2835
- name: Install Node.js dependencies
2936
run: npm install
3037
- name: Run Markmap
31-
run: npx markmap --no-toolbar innersource-program-mind-map.md -o innersource-program-mind-map.html
38+
run: npx markmap --no-toolbar ${{ matrix.folder }}/innersource-program-mind-map.md -o ${{ matrix.folder }}/innersource-program-mind-map.html
3239
- name: Screenshot Markmap Website
3340
id: screenshot-generator
3441
uses: swinton/screenshot-website@v1.x
3542
with:
36-
source: pattern-categorization/innersource-program-mind-map.html
43+
source: pattern-categorization/${{ matrix.folder }}/innersource-program-mind-map.html #strange syntax here. seems to not respect the working-directory default either
3744
destination: innersource-program-mind-map.png
3845
full-page: false
3946
- name: Copy Screenshot
40-
run: cp ${{ steps.screenshot-generator.outputs.path }} .
47+
run: cp ${{ steps.screenshot-generator.outputs.path }} ${{ matrix.folder }}
4148
- name: Reduce Screenshot Size (PNG)
42-
run: npx optipng innersource-program-mind-map.png
49+
run: npx optipng ${{ matrix.folder }}/innersource-program-mind-map.png
4350
- name: Commit Changes
4451
uses: stefanzweifel/git-auto-commit-action@v4
4552
with:

pattern-categorization/gl/innersource-program-mind-map.html

+4-4
Large diffs are not rendered by default.
Loading

pattern-categorization/innersource-program-mind-map.html

+4-4
Large diffs are not rendered by default.
Loading

0 commit comments

Comments
 (0)