This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
Run daily cron script #762
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: Run daily cron script | |
on: | |
workflow_dispatch: # Manual testing | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
daily: | |
if: ${{ 'chakra-ui/chakra-ui-docs' == github.repository }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get pnpm cache path | |
id: pnpm-cache | |
run: echo "::set-output name=dir::$(pnpm cache dir)" | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
ref: main | |
- name: Install | |
uses: ./.github/composite-actions/install | |
- name: Setup Git | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Generate avatars and all-sponsorsrc | |
run: pnpm avatars:gen | |
- name: Commit avatars and all-sponsorsrc | |
run: | | |
git add public/avatars | |
git diff --staged --quiet || git commit -m "chore(avatars): $GITHUB_SHA" | |
git add .all-sponsorsrc | |
git diff --staged --quiet || git commit -m "chore(.all-sponsorsrc): $GITHUB_SHA" | |
- name: Generate all-membersrc | |
run: pnpm members:gen | |
- name: Commit all-membersrc | |
run: | | |
git add .all-membersrc | |
git diff --staged --quiet || git commit -m "chore(.all-membersrc): $GITHUB_SHA" | |
- name: Generate all-former-membersrc | |
run: pnpm former-members:gen | |
- name: Commit all-former-membersrc | |
run: | | |
git add .all-former-membersrc | |
git diff --staged --quiet || git commit -m "chore(.all-former-membersrc): $GITHUB_SHA" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
delete-branch: true | |
title: update sponsors, members, and avatars | |
branch: chore/daily-updates |