-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.2 KB
/
publish_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
36
37
38
39
40
41
42
43
44
name: Publish Docker
on:
workflow_dispatch:
pull_request:
branches: [ main ]
push:
branches: [ main, development ]
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Checkout infrastructure repo
uses: actions/checkout@v2
with:
repository: 'JonasCir/open-survey-infra'
path: infra
- name: Checkout repo
uses: actions/checkout@v2
with:
path: repo
# production grade deployments need special setup (WSGI, static files served via nginx, etc.)
- run: cp infra/docker/staging/setup_and_run.sh repo/src/config
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
repository: jonascir/open-survey-tool
tag_with_ref: true
path: repo/src/
deploy:
# https://github.com/marketplace/actions/docker-deployment:
name: Deploy to staging
runs-on: ubuntu-20.04
needs: [ push_to_registry ]
steps:
- name: Checkout code
uses: actions/checkout@v2