forked from akamicah/overte-domain-server-docker
-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (42 loc) · 1.52 KB
/
deploy.yaml
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
---
name: Build and Push Domain Server Images
on:
push:
branches:
- main
- testing
jobs:
build-and-push:
runs-on:
- self-hosted
- linux
- podman
- docker
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/#-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub Container Registry
uses: docker/#-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build server runtime with compiled binaries
run: >
podman build -t ghcr.io/${{ github.repository }}/domain-server-builder:latest -f ./Dockerfile.build .
podman push ghcr.io/${{ github.repository }}/domain-server-builder:latest
podman build -t ghcr.io/${{ github.repository }}/domain-server:latest -f ./Dockerfile.runtime .
podman push ghcr.io/${{ github.repository }}/domain-server:latest
- name: Tag and push to Docker Hub
run: >
podman tag ghcr.io/${{ github.repository }}/domain-server:latest docker.io/${{ secrets.DOCKERHUB_USERNAME }}/domain-server:latest
podman push docker.io/${{ secrets.DOCKERHUB_USERNAME }}/domain-server:latest
- name: Clean up
run: >
podman system prune