Commit 83be8f8dbc
Unsigned
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 | ||
| 3 | name: ๐ Generate Contributor Credits | 2 | name: ๐ Generate Contributor Credits |
| 4 | on: | 3 | on: |
| 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. |
| 8 | jobs: | 7 | jobs: |
| 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 @@ | |||
| 1 | name: ๐ Inserts Awesome Privacy into README | ||
| 2 | |||
| 3 | on: | ||
| 4 | workflow_dispatch: | ||
| 5 | push: | ||
| 6 | branches: [ main ] | ||
| 7 | paths: ['awesome-privacy.yml'] | ||
| 8 | |||
| 9 | jobs: | ||
| 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 | ||