-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (81 loc) · 3.31 KB
/
docker-mapme.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
name: Docker Image CI - mapme-spatial
on:
workflow_dispatch: null
schedule:
- cron: "0 4 * * *"
push:
branches: [main, master]
paths: ['dockerfiles/mapme-base.Dockerfile', 'dockerfiles/mapme-spatial.Dockerfile', 'dockerfiles/mapme-spatial-dev.Dockerfile','.github/workflows/docker-mapme.yml', 'scripts/install_sysdeps.sh', 'scripts/install_rspatial.sh', 'scripts/install_rspatial_dev.sh']
pull_request:
branches: [main, master]
env:
tag: 1.4.2
jobs:
build-base:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
if: github.repository == 'mapme-initiative/mapme-docker'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build the mapme-base docker image
if: github.repository == 'mapme-initiative/mapme-docker'
run: |
docker build -f dockerfiles/mapme-base.Dockerfile \
--tag ghcr.io/mapme-initiative/mapme-base:$tag \
--tag ghcr.io/mapme-initiative/mapme-base:latest \
.
- name: Publish mapme-base
if: github.repository == 'mapme-initiative/mapme-docker' && github.event_name != 'pull_request'
run: docker push ghcr.io/mapme-initiative/mapme-base --all-tags
build-spatial:
needs: build-base
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
if: github.repository == 'mapme-initiative/mapme-docker'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build the mapme-spatial docker image
if: github.repository == 'mapme-initiative/mapme-docker'
run: |
docker build -f dockerfiles/mapme-spatial.Dockerfile \
--tag ghcr.io/mapme-initiative/mapme-spatial:$tag \
--tag ghcr.io/mapme-initiative/mapme-spatial:latest \
.
- name: Publish mapme-spatial
if: github.repository == 'mapme-initiative/mapme-docker' && github.event_name != 'pull_request'
run: docker push ghcr.io/mapme-initiative/mapme-spatial --all-tags
build-spatial-dev:
needs: build-base
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
if: github.repository == 'mapme-initiative/mapme-docker'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build the mapme-spatial-dev docker image
if: github.repository == 'mapme-initiative/mapme-docker'
run: |
docker build -f dockerfiles/mapme-spatial-dev.Dockerfile \
--tag ghcr.io/mapme-initiative/mapme-spatial-dev:$tag \
--tag ghcr.io/mapme-initiative/mapme-spatial-dev:latest \
.
- name: Publish mapme-spatial-dev
if: github.repository == 'mapme-initiative/mapme-docker' && github.event_name != 'pull_request'
run: docker push ghcr.io/mapme-initiative/mapme-spatial-dev --all-tags