-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (51 loc) · 1.78 KB
/
release.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Docker Image Release
on:
release:
types: [published]
jobs:
python_build:
name: Build web files
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute py script
run: python ./src/build.py
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: files
path: /home/runner/work/dyrendocs/dyrendocs
docker_build:
name: Build and upload docker image
needs: python_build
runs-on: ubuntu-latest
steps:
- name: Download required files
uses: actions/download-artifact@v2
with:
name: files
path: /home/runner/work/dyrendocs/dyrendocs
- name: Display structure of downloaded files
run: ls -R
- name: Build the image
run: docker build -t docker.pkg.github.com/dyren-de/dyrendocs/dyrendocs:1.1 .
- name: Save the image
run: docker save docker.pkg.github.com/dyren-de/dyrendocs/dyrendocs:1.1 | gzip > dyrendocs.tar.gz
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: image
path: dyrendocs.tar.gz
- name: Login
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login docker.pkg.github.com -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Push the image
run: docker push docker.pkg.github.com/dyren-de/dyrendocs/dyrendocs:1.1