-
Notifications
You must be signed in to change notification settings - Fork 4
109 lines (88 loc) · 3.21 KB
/
run-publisher.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Run publisher
on:
schedule:
- cron: '0 3 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
# cf. https://docs.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions
runs-on: ubuntu-22.04
steps:
## Free Disk Sapce: based on https://github.com/marketplace/actions/free-disk-space-ubuntu
#- name: Free Disk Space (Ubuntu)
# uses: jlumbroso/free-disk-space@main
# with:
# # this might remove tools that are actually needed,
# # if set to "true" but frees about 6 GB
# tool-cache: false
# # all of these default to true, but feel free to set to
# # "false" if necessary for your workflow
# android: true
# dotnet: true
# haskell: true
# large-packages: true
# docker-images: true
# swap-storage: true
- name: Checkout the repository
uses: actions/checkout@v4
- name: Increase git buffer size
run: |
git config --global http.postBuffer 1048576000
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install rclone
run: |
curl https://rclone.org/install.sh | sudo bash
- name: install gdal
run: |
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install gdal-bin
sudo apt-get install libgdal-dev
#- name: Create rclone config file
# run: echo "${{ secrets.RCLONE_CONFIG }}" > rclone.conf
- name: Run Python script PUBLISH
run: |
python satromo_publish.py prod_config.py
env: # Set the secrets as env var
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
RCONF_SECRET: ${{ secrets.RCONF_SECRET }}
FSDI_STAC_USER: ${{ secrets.FSDI_STAC_USER}}
FSDI_STAC_PASSWORD: ${{ secrets.FSDI_STAC_PASSWORD}}
#- name: Run Python script PUBLISH STAC
# run: |
# python satromo_publish_stac.py
# env: # Set the secrets as env var
# GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
# RCONF_SECRET: ${{ secrets.RCONF_SECRET }}
- name: Push tools files to repo
uses: github-actions-x/commit@v2.9
with:
push-branch: 'main'
commit-message: 'Tools files done'
force-add: 'true'
files: tools/
name: autoupdate
- name: Push processing files to repo
uses: github-actions-x/commit@v2.9
with:
push-branch: 'main'
commit-message: 'Processing files done'
force-add: 'true'
files: processing/
name: autoupdate
#- name: Invalidate CloudFront of satromoint
# uses: chetan/invalidate-cloudfront-action@v2
# env:
# DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
# PATHS: "/stac-collection/*"
# AWS_REGION: "eu-central-2"
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}