-
Notifications
You must be signed in to change notification settings - Fork 41
37 lines (31 loc) · 1.24 KB
/
pullFromGEE.yaml
File metadata and controls
37 lines (31 loc) · 1.24 KB
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
name: sync from GEEx
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: grant access
env:
GIT_COOKIE_VALUE: ${{ secrets.GIT_COOKIE_VALUE }}
run: |
touch ~/.gitcookies
chmod 0600 ~/.gitcookies
echo earthengine.googlesource.com,FALSE,/,TRUE,2147483647,o,${GIT_COOKIE_VALUE} | tr , \\t >>~/.gitcookies
git config --global http.postBuffer 157286400
- name: config git
run: |
git config http.cookiefile ~/.gitcookies
git config http.postBuffer 157286400
git config user.email "githubActionAutoMerge@no-one.com"
git config user.name "githubActionAutoMerge"
git config pull.rebase false
- name: mirror the git
env:
GEE_REPO_ADDRESS: ${{ secrets.GEE_REPO_ADDRESS }}
run: |
git pull https://earthengine.googlesource.com/${GEE_REPO_ADDRESS} master --allow-unrelated-histories || bash -c "git checkout --theirs . ; git add -u ; git commit -m 'autoMerge'"
git push https://earthengine.googlesource.com/${GEE_REPO_ADDRESS} master
git push