@@ -34,23 +34,30 @@ jobs:
34
34
steps :
35
35
- name : Checkout Repository
36
36
uses : actions/checkout@v2
37
- - name : Fetch Certificates
38
- env :
39
- CRT : ${{ secrets.NGINX_CRT }}
40
- KEY : ${{ secrets.NGINX_KEY }}
41
- run : |
42
- echo "${CRT}" | base64 --decode > docker/nginx-repo.crt
43
- echo "${KEY}" | base64 --decode > docker/nginx-repo.key
44
- - name : Build & Test Client
45
- if : (github.event_name != 'schedule')
46
- run : make test
37
+ - name : Determine NGINX Plus version
38
+ run : echo "NGINX_PLUS_VERSION=$(cat Makefile | grep -m1 NGINX_PLUS_VERSION | cut -d "=" -f2)" >> $GITHUB_ENV
47
39
- name : Switch Repository (Nightly)
48
40
if : (github.event_name == 'schedule')
49
41
run : |
50
42
sed -i 's|pkgs.nginx.com|pkgs-test.nginx.com|g' docker/Dockerfile
51
43
sed -i '15d' docker/Dockerfile
52
44
sed -i 's|deb https|deb [trusted=yes] https|g' docker/Dockerfile
53
- sed -i 's|nginx-plus-\${NGINX_PLUS_VERSION}|nginx-plus|g' docker/Dockerfile
45
+ sed -i 's|nginx-plus-\${{ env.NGINX_PLUS_VERSION }}|nginx-plus|g' docker/Dockerfile
46
+ - name : Build Plus Docker Image
47
+ uses : docker/build-push-action@v2
48
+ with :
49
+ file : docker/Dockerfile
50
+ context : ' docker'
51
+ tags : nginx-plus:${{ env.NGINX_PLUS_VERSION }}
52
+ load : true
53
+ secrets : |
54
+ "nginx-repo.crt=${{ secrets.NGINX_CRT }}"
55
+ "nginx-repo.key=${{ secrets.NGINX_KEY }}"
56
+ build-args :
57
+ NGINX_PLUS_VERSION=${{ env.NGINX_PLUS_VERSION }}
58
+ - name : Build & Test Client
59
+ if : (github.event_name != 'schedule')
60
+ run : make test
54
61
- name : Build & Test Client (Nightly)
55
62
if : (github.event_name == 'schedule')
56
63
run : make test
0 commit comments