From 8a03cb2b246e83734d1da6a6668d7250c585f52e Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 10 Feb 2024 23:07:07 +0000 Subject: [PATCH] Adds workflows for content insertion --- .github/workflows/insert-checklist.yml | 4 +- .github/workflows/insert-contributors.yml | 60 +++++++++-------------- .github/workflows/sync-mirror.yml | 4 +- 3 files changed, 26 insertions(+), 42 deletions(-) diff --git a/.github/workflows/insert-checklist.yml b/.github/workflows/insert-checklist.yml index e329d04..c61fc8c 100644 --- a/.github/workflows/insert-checklist.yml +++ b/.github/workflows/insert-checklist.yml @@ -3,7 +3,7 @@ name: ☑️ Generate and insert markdown from YAML on: workflow_dispatch: push: - branches: [ main ] + branches: [ master ] paths: ['personal-security-checklist.yml'] jobs: @@ -40,7 +40,7 @@ jobs: run: | git config --global user.name "Liss-Bot" git config --global user.email "alicia-gh-bot@mail.as93.net" - git pull origin main + git pull origin master git add CHECKLIST.md if git diff --staged --quiet; then echo "Nothin new added, so nothing to commit, exiting..." diff --git a/.github/workflows/insert-contributors.yml b/.github/workflows/insert-contributors.yml index 1d13f2e..596886c 100644 --- a/.github/workflows/insert-contributors.yml +++ b/.github/workflows/insert-contributors.yml @@ -1,54 +1,38 @@ -# Inserts list of contributors and community members into ./ATTRIBUTIONS.md -# Also generates an SVG showing all contributors, which is embedded into readme -name: 💓 Generate Contributor & SponsorCredits +# Inserts list of community members into ./README.md +name: 💓 Inserts Contributors & Sponsors on: workflow_dispatch: # Manual dispatch schedule: - - cron: '0 1 * * 0' # At 01:00 on Sunday. + - cron: '45 1 * * 0' # At 01:45 on Sunday. jobs: - # Job #1 - Generate an embedded SVG asset, showing all contributors - generate-contributors: - runs-on: ubuntu-latest - steps: - - name: Generate contributor SVG 💓 - uses: bubkoo/contributors-list@v1 - with: - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - svgPath: .github/CONTRIBUTORS.svg - affiliation: all - includeBots: false - avatarSize: 96 - userNameHeight: 20 - svgWidth: 1024 - commitMessage: 'Updates contributor SVG' - - # Job #2 - Fetches sponsors and inserts table into attributions page + # Job #1 - Fetches sponsors and inserts table into readme insert-sponsors: runs-on: ubuntu-latest + name: Inserts Sponsors 💓 steps: - - name: Checkout 🛎️ + - name: Checkout uses: actions/checkout@v2 - - name: Generate Sponsors in Credits 💓 + - name: Updates readme with sponsors uses: JamesIves/github-sponsors-readme-action@1.0.5 with: token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - file: 'ATTRIBUTIONS.md' + file: .github/README.md - # Job #3 - Fetches contributors and inserts table into attributions page - insert-credits: + # Job #2 - Fetches contributors and inserts table into readme + insert-contributors: runs-on: ubuntu-latest - name: Inserts contributors into ATTRIBUTIONS.md + name: Inserts Contributors 💓 steps: - - name: Contribute List - Attributions Page - uses: akhilmhdh/contributors-readme-action@v2.3.4 - env: + - name: Updates readme with contributors + uses: akhilmhdh/contributors-readme-action@v2.3.4 + env: GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - with: - image_size: 80 - readme_path: ATTRIBUTIONS.md - columns_per_row: 6 - commit_message: 'Updates contributors list' - committer_username: liss-bot - committer_email: liss-bot@d0h.co - + with: + image_size: 80 + readme_path: .github/README.md + columns_per_row: 6 + commit_message: 'docs: Updates contributors list' + committer_username: liss-bot + committer_email: liss-bot@d0h.co + \ No newline at end of file diff --git a/.github/workflows/sync-mirror.yml b/.github/workflows/sync-mirror.yml index f8b1575..2bdb7c6 100644 --- a/.github/workflows/sync-mirror.yml +++ b/.github/workflows/sync-mirror.yml @@ -1,9 +1,9 @@ # Pushes the contents of the repo to the Codeberg mirror name: 🪞 Mirror to Codeberg on: - push: - branches: [ 'master' ] workflow_dispatch: + schedule: + - cron: '30 0 * * 0' jobs: codeberg: runs-on: ubuntu-latest