Skip to content

Commit d702779

Browse files
author
Anton Staroverov
committed
refactor: replace update-readme script with code embedder action
1 parent 6e01ca9 commit d702779

3 files changed

Lines changed: 5 additions & 48 deletions

File tree

.github/workflows/update-readme.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,15 @@ on:
77
- '.gitconfig-github'
88
- '.gitconfig-gitlab'
99
- '.github/workflows/update-readme.yml'
10-
- 'scripts/update-readme.py'
1110

1211
jobs:
13-
update-readme:
12+
code_embedder:
1413
runs-on: ubuntu-latest
1514
permissions:
1615
contents: write
1716
steps:
1817
- uses: actions/checkout@v4
1918

20-
- name: Update README with config file contents
21-
run: python3 scripts/update-readme.py
22-
23-
- name: Commit changes
24-
run: |
25-
git config user.name "github-actions[bot]"
26-
git config user.email "github-actions[bot]@users.noreply.github.com"
27-
if ! git diff --quiet HEAD; then
28-
git add README.md
29-
git commit -m "docs: update README with config file contents"
30-
git push
31-
fi
19+
- uses: kvankova/code-embedder@v1.1.3
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ You'll need the following configuration files. Replace all `PLACE_HOLDER` values
2424

2525
### `.gitconfig` (Global Git Configuration)
2626

27-
<!-- GITCONFIG_EXAMPLE_START -->
28-
29-
```ini
27+
```ini:.gitconfig.example
3028
# ====================================================================
3129
# Global Git Configuration
3230
#
@@ -57,8 +55,6 @@ You'll need the following configuration files. Replace all `PLACE_HOLDER` values
5755
path = .gitconfig-gitlab
5856
```
5957

60-
<!-- GITCONFIG_EXAMPLE_END -->
61-
6258
### `.gitconfig-github` (GitHub-Specific Configuration)
6359

6460
<!-- GITCONFIG_GITHUB_START -->

scripts/update-readme.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)