Update Sprites #14
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 Sprites | |
on: | |
workflow_dispatch: | |
schedule: | |
# Runs at 12:00 AM UTC on Sunday | |
- cron: "0 0 * * 0" | |
jobs: | |
update-sprites: | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
env: | |
GH_API_KEY: ${{ secrets.GH_API_KEY }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup bun | |
uses: oven-sh/[email protected] | |
- name: Install dependencies | |
run: cd .github/workflows && bun install | |
- name: update opencollective sprite image | |
run: cd .github/workflows && bun get-sponsors.js | |
- name: update github sprite image | |
run: cd .github/workflows && bun get-contributors.js | |
- name: Configure Git | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Pouya Saadeghi" | |
- name: Commit changes | |
run: | | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Update sprites" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |