File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Require PRs modifying any file to be approved by these users
2+ * @ mathieulrl @ thibaultlangloisberthelot
Original file line number Diff line number Diff line change 1+ name : Push to Fork (kryptosphere-dev)
2+
3+ on :
4+ push :
5+ branches :
6+ - vercel
7+
8+ jobs :
9+ sync-to-fork :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+
18+ - name : Set up SSH
19+ run : |
20+ mkdir -p ~/.ssh
21+ echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
22+ chmod 600 ~/.ssh/id_ed25519
23+ ssh-keyscan github.com >> ~/.ssh/known_hosts
24+
25+ - name : Set Git config
26+ run : |
27+ git config --global user.name "GitHub Action"
28+ git config --global user.email "actions@github.com"
29+
30+ - name : Make change (example)
31+ run : |
32+ echo "Last pushed at $(date -u)" > version.txt
33+ git add version.txt
34+
35+ - name : Remove workflows from commit
36+ run : |
37+ git restore --staged .github/workflows || true
38+ git restore .github/workflows || true
39+
40+ - name : Commit if needed
41+ run : |
42+ git diff --cached --quiet || git commit -m "Update version file at $(date -u)"
43+
44+ - name : Push to kryptosphere-dev
45+ run : |
46+ git remote add fork git@github.com:kryptosphere-dev/kryptosphere-api.git
47+ git push fork vercel --force
You can’t perform that action at this time.
0 commit comments