@@ -127,10 +127,6 @@ jobs:
127
127
steps :
128
128
- name : Checkout
129
129
uses : actions/checkout@v2
130
- - name : Set up QEMU
131
- uses : docker/setup-qemu-action@v1
132
- - name : Set up Docker Buildx
133
- uses : docker/setup-buildx-action@v1
134
130
- name : Login to DockerHub
135
131
uses : docker/login-action@v1
136
132
with :
@@ -157,6 +153,7 @@ jobs:
157
153
file : ./build/Dockerfile
158
154
platforms : linux/amd64
159
155
push : true
156
+ load : true
160
157
tags : |
161
158
sysdiglabs/aks-audit-log-installer:latest
162
159
sysdiglabs/aks-audit-log-installer:${{ steps.prepare_version_labels.outputs.VERSION_MAJOR }}
@@ -168,13 +165,17 @@ jobs:
168
165
registry : docker.pkg.github.com
169
166
username : ${{ secrets.CR_PAT_PKG_USER }}
170
167
password : ${{ secrets.CR_PAT_PKG }}
171
- - name : Build and push GitHub Packages
172
- if : github.event_name == 'release'
173
- uses : docker/build-push-action@v2
174
- with :
175
- context : .
176
- file : ./build/Dockerfile
177
- platforms : linux/amd64
178
- push : true
179
- tags : |
180
- docker.pkg.github.com/sysdiglabs/aks-audit-log/aks-audit-log-installer:${{ steps.prepare_version_labels.outputs.VERSION_FULL }}
168
+ - name : Build and Push to GitHub Packages
169
+ run : |
170
+ docker build ${CONTEXT_PATH} -f ${DOCKERFILE_PATH} \
171
+ -t docker.pkg.github.com/${GH_REPO}/${IMAGE_NAME}:${VERSION_FULL}
172
+ docker push \
173
+ docker.pkg.github.com/${GH_REPO}/${IMAGE_NAME}:${VERSION_FULL}
174
+ env :
175
+ IMAGE_NAME : aks-audit-log-installer
176
+ CONTEXT_PATH : ./
177
+ DOCKERFILE_PATH : build/Dockerfile
178
+ VERSION_FULL : ${{ steps.prepare_version_labels.outputs.VERSION_FULL }}
179
+ GH_REPO : sysdiglabs/aks-audit-log
180
+
181
+
0 commit comments