Skip to content

Commit 628a505

Browse files
authored
Merge branch 'InnerSourceCommons:main' into migrating-from-innersource-to-opensource
2 parents 9db4fdd + 7f8f5bd commit 628a505

10 files changed

+1701
-70
lines changed

.github/workflows/generate-mindmap.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ jobs:
2626
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
2727
contents: write
2828

29-
strategy:
30-
matrix:
31-
folder: [".", "./gl", "./pt-br", "./es"]
32-
3329
steps:
3430
- uses: actions/checkout@v5
3531
- name: Use Node.js
@@ -40,19 +36,29 @@ jobs:
4036
cache-dependency-path: pattern-categorization/package-lock.json
4137
- name: Install Node.js dependencies
4238
run: npm install
43-
- name: Run Markmap
44-
run: npx markmap --no-toolbar ${{ matrix.folder }}/innersource-program-mind-map.md -o ${{ matrix.folder }}/innersource-program-mind-map.html
45-
- name: Screenshot Markmap Website
46-
id: screenshot-generator
47-
uses: swinton/[email protected]
48-
with:
49-
source: pattern-categorization/${{ matrix.folder }}/innersource-program-mind-map.html #strange syntax here. seems to not respect the working-directory default either
50-
destination: innersource-program-mind-map.png
51-
full-page: false
52-
- name: Copy Screenshot
53-
run: cp ${{ steps.screenshot-generator.outputs.path }} ${{ matrix.folder }}
54-
- name: Reduce Screenshot Size (PNG)
55-
run: npx optipng ${{ matrix.folder }}/innersource-program-mind-map.png
39+
- name: Disable AppArmor
40+
run: |
41+
# Disable AppArmor for unprivileged user namespaces (required for 'pageres')
42+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
43+
- name: Generate mindmap and take screenshot
44+
run: |
45+
# Loops over the top-level folder and all immediate sub-folders, except for "node_modules"
46+
for dir in . */; do
47+
# Skip node_modules
48+
[ "$(basename "$dir")" = "node_modules" ] && continue
49+
50+
echo "Creating mindmap PNG for: $dir"
51+
(
52+
# Create markmap HTML
53+
npx markmap --no-open --no-toolbar $dir/innersource-program-mind-map.md -o $dir/innersource-program-mind-map.html
54+
55+
# Take the screenshot
56+
npx pageres $dir/innersource-program-mind-map.html --overwrite --filename=$dir/innersource-program-mind-map 2560x1600
57+
58+
# Reduce Screenshot Size (PNG)
59+
npx optipng -silent $dir/innersource-program-mind-map.png
60+
)
61+
done
5662
- name: Commit Changes
5763
uses: stefanzweifel/git-auto-commit-action@v6
5864
with:

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

Lines changed: 17 additions & 6 deletions
Large diffs are not rendered by default.
-166 KB
Loading

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

Lines changed: 17 additions & 6 deletions
Large diffs are not rendered by default.
-5.96 KB
Loading
-191 KB
Loading

0 commit comments

Comments
 (0)