Commit 83be8f8dbc
Unsigned
Layout: unified · split
.github/workflows/credits.yml +4 −20
| @@ -1,27 +1,11 @@ | ||
| 1 | 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 | 2 | name: 📊 Generate Contributor Credits |
| 4 | 3 | on: |
| 5 | 4 | workflow_dispatch: # Manual dispatch |
| 6 | 5 | schedule: |
| 7 | 6 | - cron: '0 5 * * 6' # Every Saturday morning. |
| 8 | 7 | jobs: |
| 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 | |
| 25 | 9 | insert-sponsors: |
| 26 | 10 | runs-on: ubuntu-latest |
| 27 | 11 | steps: |
| @@ -31,8 +15,8 @@ jobs: | ||
| 31 | 15 | uses: JamesIves/github-sponsors-readme-action@1.0.5 |
| 32 | 16 | with: |
| 33 | 17 | 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 | |
| 36 | 20 | insert-credits: |
| 37 | 21 | runs-on: ubuntu-latest |
| 38 | 22 | name: Inserts contributors into credits.md |
| @@ -43,7 +27,7 @@ jobs: | ||
| 43 | 27 | GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 44 | 28 | with: |
| 45 | 29 | image_size: 80 |
| 46 | readme_path: .github/CREDITS.md | |
| 30 | readme_path: .github/README.md | |
| 47 | 31 | columns_per_row: 6 |
| 48 | 32 | commit_message: 'Updates contributors list' |
| 49 | 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 | |