Update Badges #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Badges | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */1 * * *" | |
jobs: | |
update-badges: | |
name: Update Badges | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@master | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 9 | |
run_install: false | |
- name: Install dependencies | |
run: pnpm install | |
- name: Clear Badges | |
run: rm -rf users && mkdir users | |
- name: Setup env | |
run: | | |
echo "GITHUB_TOKEN = ${{ secrets.GITHUB_TOKEN }}" >> .env | |
echo "BADGE_VAULT_KEY = ${{ secrets.BADGE_VAULT_KEY }}" >> .env | |
- name: Update Aliucord Badges | |
run: node scripts/getAliucordBadges.mjs | |
- name: Update BetterDiscord Badges | |
run: node scripts/getBetterDiscordBadges.mjs | |
- name: Update BadgeVault Badges | |
run: node scripts/getBadgeVaultBadges.mjs | |
- name: Update Opti Badges | |
run: node scripts/getOptiBadges.mjs | |
- name: Update Enmity Badges | |
run: node scripts/getEnmityBadges.mjs | |
- name: Update Vencord Badges | |
run: node scripts/getVencordBadges.mjs | |
- name: Push Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add . | |
git commit -m "Updated Badges" || exit 0 | |
git push |