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 @@
1# Inserts list of contributors and community members into ./docs/credits.md 1# Inserts list of contributors and community members into ./docs/credits.md
2# Also generates an SVG showing all contributors, which is embedded into readme
3name: ๐Ÿ“Š Generate Contributor Credits 2name: ๐Ÿ“Š Generate Contributor Credits
4on: 3on:
5 workflow_dispatch: # Manual dispatch 4 workflow_dispatch: # Manual dispatch
6 schedule: 5 schedule:
7 - cron: '0 5 * * 6' # Every Saturday morning. 6 - cron: '0 5 * * 6' # Every Saturday morning.
8jobs: 7jobs:
9 # Job #1 - Generate an embedded SVG asset, showing all contributors 8 # Job #1 - Inserts sponsors into README
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
25 insert-sponsors: 9 insert-sponsors:
26 runs-on: ubuntu-latest 10 runs-on: ubuntu-latest
27 steps: 11 steps:
@@ -31,8 +15,8 @@ jobs:
31 uses: JamesIves/github-sponsors-readme-action@1.0.5 15 uses: JamesIves/github-sponsors-readme-action@1.0.5
32 with: 16 with:
33 token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} 17 token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
34 file: '.github/CREDITS.md' 18 file: '.github/README.md'
35 # Job #3 - Inserts contributors into credits page 19 # Job #2 - Inserts contributors into README
36 insert-credits: 20 insert-credits:
37 runs-on: ubuntu-latest 21 runs-on: ubuntu-latest
38 name: Inserts contributors into credits.md 22 name: Inserts contributors into credits.md
@@ -43,7 +27,7 @@ jobs:
43 GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} 27 GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
44 with: 28 with:
45 image_size: 80 29 image_size: 80
46 readme_path: .github/CREDITS.md 30 readme_path: .github/README.md
47 columns_per_row: 6 31 columns_per_row: 6
48 commit_message: 'Updates contributors list' 32 commit_message: 'Updates contributors list'
49 committer_username: liss-bot 33 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