mirror of
https://github.com/prdlk/leetcode.git
synced 2026-09-16 23:16:26 +00:00
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: SRS Logger
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
|
|
# Shared with srs-scheduler / gate / srs-setup: never race on srs.json.
|
|
concurrency:
|
|
group: srs-state
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
log:
|
|
# Owner-only, and only on the daily brief or a gate issue. Put every
|
|
# /done line in ONE comment — queued duplicate runs may be superseded.
|
|
if: >-
|
|
github.event.comment.user.login == github.repository_owner &&
|
|
(github.event.issue.title == '📋 Today' ||
|
|
contains(github.event.issue.labels.*.name, 'gate'))
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
|
|
- run: bun scripts/srs-logger.ts
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PROJECT_PAT: ${{ secrets.PROJECT_PAT }}
|
|
|
|
- name: Commit state
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add .github/srs
|
|
git diff --cached --quiet && { echo "no state change"; exit 0; }
|
|
git commit -m "srs: log results from #${{ github.event.issue.number }} [skip ci]"
|
|
for i in 1 2 3; do git push && exit 0; git pull --rebase; done
|
|
git push
|