-
Notifications
You must be signed in to change notification settings - Fork 160
35 lines (30 loc) · 1.12 KB
/
docker.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
on:
push:
branches:
- master
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
if: github.repository == 'CrunchyData/pg_tileserv'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build ARM64
run: make TARGETARCH=arm64 multi-stage-docker
- name: Build x86_64
run: make TARGETARCH=amd64 multi-stage-docker
- name: Docker Upload
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
DOCKER_REPO: pramsey/pg_tileserv
run: |
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
docker push --all-tags $DOCKER_REPO
docker manifest create $DOCKER_REPO:latest $DOCKER_REPO:latest-amd64 $DOCKER_REPO:latest-arm64
docker manifest push $DOCKER_REPO:latest
date_tag=$(docker images | grep tileserv | grep -v latest | grep -v arm64 | awk '{print $2}')
date_tag=${date_tag/-amd64/}
docker manifest create $DOCKER_REPO:${date_tag} $DOCKER_REPO:${date_tag}-amd64 $DOCKER_REPO:${date_tag}-arm64
docker manifest push $DOCKER_REPO:${date_tag}