-
Notifications
You must be signed in to change notification settings - Fork 2
117 lines (115 loc) · 3.8 KB
/
dockerbuild.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: DockerBuild
on:
push:
branches:
- master
- test
jobs:
publish-simple-example-image:
name: Publish Simple Example Image
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v2
-
name: DockerBuild
uses: docker/build-push-action@v1
with:
dockerfile: simple-example--fibonacci-model/Dockerfile
path: ./simple-example--fibonacci-model
username: dafni-service-account
password: ${{ secrets.SERVICE_ACCOUNT }}
registry: ghcr.io
repository: dafnifacility/simple-example--fibonacci-model
tags: latest
tag_with_sha: true
tag_with_ref: true
-
name: Compress docker image
run: |
docker build -t simple-example ./simple-example--fibonacci-model/
docker save -o simple-example.tar simple-example:latest
gzip simple-example.tar
-
name: Upload To DAFNI
uses: dafnifacility/[email protected]
with:
definition-path: ./simple-example--fibonacci-model/model_definition.yaml
image-path: ./simple-example.tar.gz
username: model-uploader
password: ${{ secrets.DAFNI_SERVICE_ACCOUNT_PASSWORD }}
version-message: "Uploaded from GitHub workflow"
parent-model: "abdffa58-f0ee-482a-b09f-87d3dc16f31a"
publish-tiny-example-image:
name: Publish Tiny Example Image
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v2
-
name: DockerBuild
uses: docker/build-push-action@v1
with:
dockerfile: tiny-example--hello-world-model/Dockerfile
path: ./tiny-example--hello-world-model
username: dafni-service-account
password: ${{ secrets.SERVICE_ACCOUNT }}
registry: ghcr.io
repository: dafnifacility/tiny-example--hello-world-model
tags: latest
tag_with_sha: true
tag_with_ref: true
-
name: Compress docker image
run: |
docker build -t tiny-example ./tiny-example--hello-world-model/
docker save -o tiny-example.tar tiny-example:latest
gzip tiny-example.tar
-
name: Upload To DAFNI
uses: dafnifacility/[email protected]
with:
definition-path: ./tiny-example--hello-world-model/model_definition.yaml
image-path: ./tiny-example.tar.gz
username: model-uploader
password: ${{ secrets.DAFNI_SERVICE_ACCOUNT_PASSWORD }}
version-message: "Uploaded from GitHub workflow"
parent-model: "da6d001a-d58e-4931-8e9f-af653e5f14f1"
publish-uk-climate-analysis-image:
name: Publish UK Climate Analysis Image
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v2
-
name: DockerBuild
uses: docker/build-push-action@v1
with:
dockerfile: uk-climate-analysis/Dockerfile
path: ./uk-climate-analysis
username: dafni-service-account
password: ${{ secrets.SERVICE_ACCOUNT }}
registry: ghcr.io
repository: dafnifacility/uk-climate-analysis
tags: latest
tag_with_sha: true
tag_with_ref: true
-
name: Compress docker image
run: |
docker build -t uk-climate-analysis ./uk-climate-analysis/
docker save -o uk-climate-analysis.tar uk-climate-analysis:latest
gzip uk-climate-analysis.tar
-
name: Upload To DAFNI
uses: dafnifacility/[email protected]
with:
definition-path: ./uk-climate-analysis/model_definition.yaml
image-path: ./uk-climate-analysis.tar.gz
username: model-uploader
password: ${{ secrets.DAFNI_SERVICE_ACCOUNT_PASSWORD }}
version-message: "Uploaded from GitHub workflow"
parent-model: "737bf851-b1b2-43bd-9d7c-9421500c818f"