forked from EpiDoc/EFES
-
Notifications
You must be signed in to change notification settings - Fork 7
31 lines (30 loc) · 957 Bytes
/
deployment.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
name: Publish Docker image
on:
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
repository: sigidoc/sigidoc_latest
tags: latest
dockerfile: Dockerfile
deploy:
name: Deploy image
needs: push_to_registry
runs-on: self-hosted
steps:
- name: Pull image
run: docker pull ghcr.io/sigidoc/sigidoc_latest:latest
- name: Stop previous container
run: docker stop sigidoc || true && docker rm sigidoc || true
- name: Run image
run: docker run -p 9000:9999 -d --rm --name sigidoc ghcr.io/sigidoc/sigidoc_latest:latest