File tree 1 file changed +7
-24
lines changed
1 file changed +7
-24
lines changed Original file line number Diff line number Diff line change 10
10
workflow_dispatch :
11
11
12
12
jobs :
13
- build :
14
- runs-on : ubuntu-20.04
13
+ build-ubuntu :
14
+ runs-on : ubuntu-latest
15
+ strategy :
16
+ matrix :
17
+ image : ["alpine", "ubuntu"]
15
18
steps :
16
19
- name : Checkout
17
20
uses : actions/checkout@v3
52
55
if : github.event_name == 'push' || github.event_name == 'workflow_dispatch'
53
56
run : echo "version=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
54
57
55
- - name : (Ubuntu) Build and push
58
+ - name : Build and push
56
59
id : docker-build-ubuntu
57
60
uses : docker/build-push-action@v2
58
61
with :
69
72
tags : |
70
73
${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ env.version || github.ref_name }}
71
74
72
- - name : (Alpine) Build and push
73
- id : docker-build-alpine
74
- uses : docker/build-push-action@v2
75
- with :
76
- context : .
77
- file : ./docker/onadata-uwsgi/Dockerfile.alpine
78
- platforms : linux/amd64
79
- cache-from : type=registry,ref=${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ env.version }}-alpine
80
- cache-to : type=inline
81
- ssh : |
82
- default=/tmp/ssh-agent.sock
83
- build-args : |
84
- optional_packages=PyYAML django-redis ${{ secrets.ECR_OPTIONAL_PACKAGES }}
85
- push : true
86
- tags : |
87
- ${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ env.version || github.ref_name }}-alpine
88
-
89
- - name : (Ubuntu) Image digest
75
+ - name : Image digest
90
76
run : echo ${{ steps.docker-build-ubuntu.outputs.digest }}
91
77
92
- - name : (Alpine) Image digest
93
- run : echo ${{ steps.docker-build-alpine.outputs.digest }}
94
-
95
78
- name : Run Trivy vulnerability scanner
96
79
uses : aquasecurity/trivy-action@master
97
80
with :
You can’t perform that action at this time.
0 commit comments