-
Notifications
You must be signed in to change notification settings - Fork 10
68 lines (56 loc) · 1.72 KB
/
update.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
name: STAC Updater
on:
# Run once per day at midnight
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
env:
GDAL_DISABLE_READDIR_ON_OPEN: EMPTY_DIR
AWS_NO_SIGN_REQUEST: YES
AWS_REGION: us-west-2
jobs:
build-and-test:
if: github.repository != 'relativeorbit/aws-rtc-stac'
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
# mamba-version: "*"
environment-file: environment.yml
activate-environment: aws-rtc-stac
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: List conda packages
run: |
conda list
- name: Generate STAC
run: |
./s1_rtc_stac.py
- name: Validate STAC
run: |
stac validate --recurse --no-links --no-assets catalog.json
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: "update catalog through ${{ steps.date.outputs.date }}"
title: "Update STAC (${{ steps.date.outputs.date }})"
reviewers: "egagli"
body: |
Update catalog through ${{ steps.date.outputs.date }})