-
-
Notifications
You must be signed in to change notification settings - Fork 30
37 lines (31 loc) · 1.12 KB
/
sync-mirror.yml
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
27
28
29
30
31
32
33
34
35
36
37
# For more information on how to use this pipeline please refer to:
# http://tardis-sn.github.io/tardis/development/continuous_integration.html
name: sync-mirror
on:
push:
branches:
- master
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Clone mirror repository
run: |
git clone --bare https://[email protected]/tardis-sn/TARDIS/_git/tardis-refdata
- name: Set upstream remote
run: |
cd tardis-refdata.git
git remote add --mirror=fetch upstream https://github.com/tardis-sn/tardis-refdata.git
git fetch upstream --tags
- name: Fetch LFS objects
run: |
cd tardis-refdata.git
git lfs fetch upstream --all
- name: Push changes to mirror
run: |
cd tardis-refdata.git
MY_PAT=${{ secrets.AZURE_TOKEN }}
B64_PAT=$(printf ":$MY_PAT" | base64)
git config --local http.version HTTP/1.1
git -c http.extraHeader="Authorization: Basic ${B64_PAT}" push origin --all
git -c http.extraHeader="Authorization: Basic ${B64_PAT}" lfs push origin --all