Skip to content

Commit 0fb91cd

Browse files
leohhhngithub-actions[bot]
andauthoredOct 1, 2024··
feat: automate readme table (#60)
* add yml * add ymls * save * save * update script * save * add workflow * rm files * build * build * update workflow * w * w * update w * rm diff * update readme * workflow * wf * wf * CI: Update README.md with generated table * build * wf * save * update table * CI: Update README.md with generated table * update ci * add table scripts * add data * fix local links, update tbl * rm comments * fixup script * name * name * add lint script * update * test ci * test ci agian * rm test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 626c2d0 commit 0fb91cd

File tree

56 files changed

+876
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+876
-34
lines changed
 

Diff for: ‎.github/workflows/table-lint.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "table lint"
2+
3+
on:
4+
push:
5+
paths:
6+
- main
7+
pull_request:
8+
paths:
9+
- "presentations/**"
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: '1.22'
23+
24+
- name: Run linter
25+
run: make lint

Diff for: ‎Makefile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ROWS=15
2+
FILE="README.md"
3+
4+
build:
5+
./scripts/del-existing-rows.sh $(ROWS) $(FILE)
6+
7+
go run scripts/generate-table.go -path ./presentations -out scripts/data.csv -rows $(ROWS)
8+
cat scripts/data.csv | go run moul.io/mdtable csv > scripts/table.md
9+
go run github.com/campoy/embedmd -w README.md
10+
# Clean up
11+
rm scripts/data.csv scripts/table.md
12+
13+
./scripts/del-codeblock.sh $(FILE)
14+
15+
lint:
16+
cd ./scripts && go run lint.go

0 commit comments

Comments
 (0)
Please sign in to comment.