File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sync Prod Branch
2+
3+ on :
4+ schedule :
5+ - cron : " 0 0 * * *" # Daily at midnight UTC
6+ workflow_dispatch : # Manual trigger
7+
8+ jobs :
9+ sync :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+ token : ${{ secrets.GITHUB_TOKEN }}
17+
18+ - name : Configure Git
19+ run : |
20+ git config user.name "github-actions[bot]"
21+ git config user.email "github-actions[bot]@users.noreply.github.com"
22+
23+ - name : Fetch upstream
24+ run : git fetch upstream
25+
26+ - name : Reset prod to upstream/dev
27+ run : |
28+ git checkout prod
29+ git reset --hard upstream/dev
30+
31+ - name : Push prod
32+ run : |
33+ SKIP_HUSKY=1 git push origin prod --force
34+ env :
35+ SKIP_HUSKY : 1
Original file line number Diff line number Diff line change 11#! /bin/sh
2+ # Skip husky for sync or prod branch
3+ if [ " $SKIP_HUSKY " = " 1" ] || [ " $( git rev-parse --abbrev-ref HEAD) " = " prod" ]; then
4+ exit 0
5+ fi
26# Check if bun version matches package.json
37EXPECTED_VERSION=$( grep ' "packageManager"' package.json | sed ' s/.*"bun@\([^"]*\)".*/\1/' )
48CURRENT_VERSION=$( bun --version)
You can’t perform that action at this time.
0 commit comments