Skip to content

Commit 9ad01df

Browse files
committed
feat: Use Kaniko for building and publishing Docker images to the registry
1 parent 90ecdc1 commit 9ad01df

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,16 @@ jobs:
3333
- name: Set VERSION environment variable
3434
run: echo "VERSION=${{ steps.version.outputs.version }}" >> $GITHUB_ENV
3535

36-
- name: Log in to DockerHub
37-
uses: docker/login-action@v2
36+
- name: Build and push Docker image using Kaniko
37+
uses: aevea/action-kaniko@master
3838
with:
39+
image: ${{ secrets.WEB_APP_NAME }}
40+
tag: ${{ env.VERSION }}
41+
path: ./
42+
build_file: Dockerfile
3943
username: ${{ secrets.DOCKER_USERNAME }}
4044
password: ${{ secrets.DOCKER_PASSWORD }}
4145

42-
- name: Build Docker image
43-
run: |
44-
docker build -t ${{ secrets.WEB_APP_NAME }}:${{ env.VERSION }} .
45-
46-
- name: Push Docker image
47-
run: |
48-
docker push ${{ secrets.WEB_APP_NAME }}:${{ env.VERSION }}
49-
5046
- name: Push tag
5147
run: |
5248
git config user.name "github-actions"

0 commit comments

Comments
 (0)