Commit 83be8f8dbc

83be8f8dbc044a6e42e5f3827f703cb05bfecc7f

parent: 24e59790d0

Unsigned

Alicia Sykes <alicia@omg.lol> · 2024-02-25 15:28 UTC

Adds workflows to insert readme content

Layout: unified · split

.github/workflows/credits.yml +4 −20
@@ -1,27 +1,11 @@
11# Inserts list of contributors and community members into ./docs/credits.md
2# Also generates an SVG showing all contributors, which is embedded into readme
32name: 📊 Generate Contributor Credits
43on:
54 workflow_dispatch: # Manual dispatch
65 schedule:
76 - cron: '0 5 * * 6' # Every Saturday morning.
87jobs:
9 # Job #1 - Generate an embedded SVG asset, showing all contributors
10 generate-contributors:
11 runs-on: ubuntu-latest
12 steps:
13 - uses: bubkoo/contributors-list@v1
14 with:
15 GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
16 svgPath: .github/assets/CONTRIBUTORS.svg
17 affiliation: all
18 includeBots: false
19 excludeUsers: snyk-bot
20 avatarSize: 96
21 userNameHeight: 20
22 svgWidth: 830
23 commitMessage: 'Updates contributor SVG'
24 # Job #2 - Inserts sponsors into credits page
8 # Job #1 - Inserts sponsors into README
259 insert-sponsors:
2610 runs-on: ubuntu-latest
2711 steps:
@@ -31,8 +15,8 @@ jobs:
3115 uses: JamesIves/github-sponsors-readme-action@1.0.5
3216 with:
3317 token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
34 file: '.github/CREDITS.md'
35 # Job #3 - Inserts contributors into credits page
18 file: '.github/README.md'
19 # Job #2 - Inserts contributors into README
3620 insert-credits:
3721 runs-on: ubuntu-latest
3822 name: Inserts contributors into credits.md
@@ -43,7 +27,7 @@ jobs:
4327 GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
4428 with:
4529 image_size: 80
46 readme_path: .github/CREDITS.md
30 readme_path: .github/README.md
4731 columns_per_row: 6
4832 commit_message: 'Updates contributors list'
4933 committer_username: liss-bot
.github/workflows/insert-privacy-list.yml added +50
@@ -0,0 +1,50 @@
1name: 📚 Inserts Awesome Privacy into README
2
3on:
4 workflow_dispatch:
5 push:
6 branches: [ main ]
7 paths: ['awesome-privacy.yml']
8
9jobs:
10 build:
11 runs-on: ubuntu-latest
12
13 steps:
14 - name: Checkout repository 🛎️
15 uses: actions/checkout@v2
16
17 # Get current date-time (used for commit message)
18 - name: Get Date 📅
19 id: date
20 run: echo "::set-output name=date::$(date +'%d-%b-%Y')"
21
22 # Downloads + installs Python (used for running gen scripts)
23 - name: Set up Python 🐍
24 uses: actions/setup-python@v2
25 with:
26 python-version: '3.x'
27
28 # Install contents of requirements.txt
29 - name: Install dependencies 📥
30 run: |
31 python -m pip install --upgrade pip
32 cd lib && pip install -r requirements.txt
33
34 # The make command triggers all the Python scripts, generates output
35 - name: Run make command 🔨
36 run: python lib/awesome-privacy-readme-gen.py
37
38 # Commit and push the outputed readme
39 - name: Commit and push generated files ⤴️
40 run: |
41 git config --global user.name "Liss-Bot"
42 git config --global user.email "alicia-gh-bot@mail.as93.net"
43 git pull origin main
44 git add .github/README.md
45 if git diff --staged --quiet; then
46 echo "Nothin new added, so nothing to commit, exiting..."
47 else
48 git commit -m "Updated Awesome Privacy content (last modified on ${{ steps.date.outputs.date }})"
49 git push
50 fi