File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Sync changes to GitLab
2
+
3
+ on :
4
+ push :
5
+ branches : [master]
6
+
7
+ permissions :
8
+ contents : read
9
+
10
+ jobs :
11
+ build :
12
+ if : (github.repository == 'adamlui/userscripts')
13
+ runs-on : ubuntu-latest
14
+ env :
15
+ TZ : PST8PDT
16
+
17
+ steps :
18
+
19
+ - name : Checkout adamlui/userscripts
20
+ uses : actions/checkout@v5
21
+ with :
22
+ repository : adamlui/userscripts
23
+ path : adamlui/userscripts
24
+ fetch-depth : 0
25
+
26
+ - name : Escape backticks in commit msg
27
+ env :
28
+ COMMIT_MSG : ${{ github.event.head_commit.message }}
29
+ run : |
30
+ echo "ESCAPED_MSG<<EOF" >> $GITHUB_ENV
31
+ echo "$COMMIT_MSG" | sed 's/`/\`/g' >> $GITHUB_ENV
32
+ echo "EOF" >> $GITHUB_ENV
33
+
34
+ - name : Config committer
35
+ run : |
36
+ gpg --batch --import <(echo "${{ secrets.GPG_PRIVATE_KEY }}")
37
+ git config --global commit.gpgsign true
38
+ git config --global user.name "kudo-sync-bot"
39
+ git config --global user.email "auto-sync@kudoai.com"
40
+ git config --global user.signingkey "${{ secrets.GPG_PRIVATE_ID }}"
41
+
42
+ - name : Push changes to gitlab.com/adamlui/userscripts
43
+ run : |
44
+ cd ${{ github.workspace }}/adamlui/userscripts
45
+ git push --force https://oauth2:${{ secrets.GITLAB_SYNC_PAT }}@gitlab.com/adamlui/userscripts.git master
You can’t perform that action at this time.
0 commit comments