This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (36 loc) · 1.48 KB
/
main.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
name: Parla auth CD
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build checkin API
run: |
docker build -t docker.pkg.github.com/ffauchille/parla/parla-auth:v1 .
docker login docker.pkg.github.com -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
docker push docker.pkg.github.com/ffauchille/parla/parla-auth:v1
- name: Deploy checkin API
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
script: |
docker login docker.pkg.github.com -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
docker stop parla-auth-v1 || true
docker rm parla-auth-v1 || true
docker pull docker.pkg.github.com/ffauchille/parla/parla-auth:v1
# Groupe SIGL: use the following line instead
# docker run -d -p 80:80 --name parla-auth-v1 docker.pkg.github.com/ffauchille/parla/parla-auth:v1
# and comment the next one
docker run -d --network="mobynet" \
--label traefik.enable=true \
--label traefik.docker.network=mobynet \
--label traefik.frontend.rule=Host:parla-auth.arla-sigl.fr \
--label traefik.frontend.port=80 \
--name parla-auth-v1 \
docker.pkg.github.com/ffauchille/parla/parla-auth:v1