Sync #126
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: Sync | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: sync | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git remote add ejs https://github.com/yt-dlp/ejs.git || true | |
| - name: Sync subtree | |
| run: | | |
| git fetch ejs main | |
| git subtree pull --prefix=ejs ejs main --squash | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| - name: Sync dependencies | |
| run: npm run sync:deps | |
| - name: Commit changes | |
| run: | | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| git add -A | |
| git commit -m "chore: sync with ejs" | |
| git push origin main | |
| fi |