-
Notifications
You must be signed in to change notification settings - Fork 53
91 lines (88 loc) · 3.48 KB
/
yDISPATCH_gBLayer.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
on:
workflow_dispatch:
inputs:
bType:
description: Boundary Type (Required)
required: true
ISO:
description: Boundary ISO (Required)
required: true
ADM:
description: Boundary ADM Level
required: true
name: yDISPATCH_gBLayer
run-name: ${{ inputs.ISO }} | ${{ inputs.ADM }} | ${{ inputs.bType }}
jobs:
gbBuild:
runs-on: ubuntu-latest
container: docker://geogdan/geoboundaries:A
steps:
- name: Git Clone
run: |
echo $GITHUB_WORKSPACE
cd $GITHUB_WORKSPACE
cd ..
rm -r geoBoundaries
git config --global pack.window "0"
echo "=============="
add-apt-repository -y ppa:git-core/ppa
apt-get -y update
apt-get install -y git
git --version
git clone --filter=blob:none --no-checkout https://github.com/wmgeolab/geoBoundaries
echo "=============="
cd geoBoundaries
echo "=============="
git sparse-checkout set "sourceData/${{github.event.inputs.bType}}/${{github.event.inputs.ISO}}_${{github.event.inputs.ADM}}.zip"
git sparse-checkout add ".gitattributes"
git sparse-checkout add ".gitignore"
git sparse-checkout add "releaseData/${{github.event.inputs.bType}}/${{github.event.inputs.ISO}}/${{github.event.inputs.ADM}}/"
git checkout
git clone https://github.com/wmgeolab/geoBoundaryBot
ls -l
- name: Checking Files
id: checks
run: |
echo "==============================================="
mkdir ~/tmp
mkdir ~/artifacts
python $GITHUB_WORKSPACE/geoBoundaryBot/gbBuild.py ${{github.event.inputs.bType}} nightly ${{github.event.inputs.ISO}} ${{github.event.inputs.ADM}} ${{secrets.DRTOKEN}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Commit Files
env:
DRTOKEN: ${{secrets.DRTOKEN}}
REP: ${{env.GITHUB_REPOSITORY}}
run: |
cd $GITHUB_WORKSPACE
ls
echo "=====CONFIG========="
git config --local user.email "[email protected]"
git config --local user.name "DanRunfola"
git config --global http.postBuffer 1000M
git config --global http.maxRequestBuffer 100M
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
git config --global core.compression 0
git reset
echo "======FIND==========="
find * -type f -size +99M -exec git lfs track --filename '{}' +
echo "=======ADD=========="
git add "releaseData/${{github.event.inputs.bType}}/${{github.event.inputs.ISO}}/${{github.event.inputs.ADM}}/"
echo "=======ADD GITATTRIBUTES=========="
git add .gitattributes
echo "========STATUS========="
git status
echo "================="
git commit -m "gB Nightly `date`"
echo "================="
git remote set-url origin https://x-access-token:${{ secrets.DRTOKEN }}@github.com/$GITHUB_REPOSITORY
echo "================="
git config pull.rebase false
git pull
git push
- name: Create Artifact
uses: actions/upload-artifact@v2
with:
name: results
path: ~/artifacts/