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+ name : Mirror to sourcebot-private
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - " v*"
9+ - " setup-sourcebot-v*"
10+ # Release commits use `[skip ci]`, which suppresses push-triggered workflows.
11+ workflow_run :
12+ workflows :
13+ - Release Sourcebot (Production)
14+ - Release setup-sourcebot
15+ types :
16+ - completed
17+ workflow_dispatch :
18+
19+ permissions :
20+ contents : read
21+
22+ concurrency :
23+ group : mirror-sourcebot-private
24+ cancel-in-progress : false
25+
26+ jobs :
27+ mirror :
28+ if : github.repository == 'sourcebot-dev/sourcebot'
29+ runs-on : ubuntu-latest
30+ environment : sourcebot-private-mirror
31+
32+ steps :
33+ - name : Check out complete repository history
34+ uses : actions/checkout@v7
35+ with :
36+ ref : main
37+ fetch-depth : 0
38+ fetch-tags : true
39+ persist-credentials : false
40+
41+ - name : Create mirror installation token
42+ id : app-token
43+ uses : actions/create-github-app-token@v3
44+ with :
45+ client-id : ${{ vars.MIRROR_APP_CLIENT_ID }}
46+ private-key : ${{ secrets.MIRROR_APP_PRIVATE_KEY }}
47+ owner : sourcebot-dev
48+ repositories : sourcebot-private
49+ permission-contents : write
50+ permission-workflows : write
51+
52+ - name : Mirror main and tags
53+ env :
54+ MIRROR_TOKEN : ${{ steps.app-token.outputs.token }}
55+ shell : bash
56+ run : |
57+ git remote add private \
58+ "https://x-access-token:${MIRROR_TOKEN}@github.com/sourcebot-dev/sourcebot-private.git"
59+
60+ git push --atomic private HEAD:refs/heads/main --tags
You can’t perform that action at this time.
0 commit comments