-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (23 loc) · 984 Bytes
/
main.yml
File metadata and controls
26 lines (23 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: GitlabSync
# Gets and increments tag associated with latest release
# Should be used when not in an [on->push-tags]
# curl -s 'https://api.github.com/repos/rtsfred3/GithubStatusJS/releases/latest' | python3 -c "import sys, json; n = json.load(sys.stdin)['tag_name'][1:].split('.'); n = [int(i) for i in n]; n[-1] += 1; print('v' + '.'.join([str(s) for s in n]))"
on:
- push
- delete
jobs:
sync:
runs-on: ubuntu-latest
name: Git Repo Sync
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wangchucheng/git-repo-sync@v0.1.0
with:
# Such as https://github.com/wangchucheng/git-repo-sync.git
target-url: ${{ secrets.TARGET_URL }}
# Such as wangchucheng
target-username: ${{ secrets.TARGET_USERNAME }}
# You can store token in your project's 'Setting > Secrets' and reference the name here. Such as ${{ secrets.ACCESS\_TOKEN }}
target-token: ${{ secrets.TARGET_TOKEN }}