docs(profile): 📚 add open330-repo-pulse intro #21
This file contains hidden or 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 Profile | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # every day at 00:00 UTC | |
| push: | |
| branches: [main] | |
| paths: | |
| - "scripts/profile-gen/**" | |
| - ".github/workflows/update-profile.yml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: update-profile | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-profile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: scripts/profile-gen | |
| - name: Install scc | |
| run: | | |
| wget -qO- https://github.com/boyter/scc/releases/download/v3.4.0/scc_Linux_x86_64.tar.gz | tar xz | |
| sudo mv scc /usr/local/bin/ | |
| scc --version | |
| - name: Generate profile | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.ORG_PAT || secrets.GITHUB_TOKEN }} | |
| run: cargo run --release --manifest-path scripts/profile-gen/Cargo.toml | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add profile/README.md | |
| git diff --staged --quiet || git commit -m "chore(profile): 🔄 update profile statistics" | |
| git pull --rebase | |
| git push |