Skip to content

Commit df25ce1

Browse files
committed
add cron
1 parent 7f0eb91 commit df25ce1

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
paths:
6+
- '**Dockerfile'
7+
- 'runtimes/**'
48

59
jobs:
610
build:

.github/workflows/cron.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CRON
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 1 * *'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
image-name: ['base', 'base-2']
13+
gdal-version: [2.4, 3.1, 3.2]
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Login to DockerHub
17+
uses: docker/login-action@v1
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
22+
- name: set amazonlinux version
23+
id: amazonlinux
24+
run: echo "::set-output name=version::$(if [ '${{ matrix.image-name }}' == 'base-2' ]; then echo '-al2'; else echo ''; fi)"
25+
shell: bash
26+
27+
- name: Pull GDAL Images
28+
run: docker pull lambgeo/lambda-gdal:${{ matrix.gdal-version }}${{ steps.amazonlinux.outputs.version }}
29+
30+
- name: Pull Runtime Images
31+
run: |
32+
runtimes=$(if [ '${{ steps.amazonlinux.outputs.version }}' == '-al2' ]; then echo 'python3.8'; else echo 'python3.7'; fi)
33+
for runtime in ${runtimes}; do
34+
docker pull lambgeo/lambda-gdal:${{ matrix.gdal-version }}-${runtime}
35+
done

0 commit comments

Comments
 (0)