File tree Expand file tree Collapse file tree 1 file changed +2
-29
lines changed
Expand file tree Collapse file tree 1 file changed +2
-29
lines changed Original file line number Diff line number Diff line change 1- # .github/workflows/sync-to-production.yml
2-
31name : Sync main to sandbox-production
42
53on :
1412 runs-on : ubuntu-latest
1513
1614 steps :
17- - name : Checkout code
18- uses : actions/checkout@v4
19- with :
20- fetch-depth : 0 # Fetch all history so we can force push
21-
22- - name : Set up Git
23- run : |
24- git config --global user.name 'github-actions[bot]'
25- git config --global user.email 'github-actions[bot]@livekit.io'
26-
27- - name : Sync to sandbox-production
28- env :
29- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30- run : |
31- git checkout sandbox-production || git checkout -b sandbox-production
32- git merge --strategy-option theirs main
33- git push origin sandbox-production
34-
35- - name : Tag the deployment
36- if : github.ref == 'refs/heads/main'
37- env :
38- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39- run : |
40- # Increment version from previous tag of format vX
41- VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//' | awk -F. -v OFS=. '{$NF++;print}')
42- git tag -a "v$VERSION" -m "Deploy v$VERSION to production"
43- git push origin "v$VERSION"
15+ - name : Sync main to production branch and increment version
16+ uses : livekit-examples/sandbox-deploy-action
You can’t perform that action at this time.
0 commit comments