From b7f00324bcba35f97ed503aed949a619249d91c0 Mon Sep 17 00:00:00 2001 From: Anas Khafaga Date: Tue, 8 Oct 2024 16:28:45 +0300 Subject: [PATCH] feat(CI): Build docker images --- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/cife.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d620820..2ea8961f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,8 @@ name: Build and push DocsGPT Docker image on: - workflow_dispatch: - push: - branches: - - main + release: + types: [published] jobs: deploy: @@ -43,5 +41,7 @@ jobs: context: ./application push: true tags: | - ${{ secrets.DOCKER_USERNAME }}/docsgpt:latest - ghcr.io/${{ github.repository_owner }}/docsgpt:latest + ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }},${{ secrets.DOCKER_USERNAME }}/docsgpt:latest + ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }},ghcr.io/${{ github.repository_owner }}/docsgpt:latest + cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt:latest + cache-to: type=inline diff --git a/.github/workflows/cife.yml b/.github/workflows/cife.yml index 67aadfbb..73a97755 100644 --- a/.github/workflows/cife.yml +++ b/.github/workflows/cife.yml @@ -1,10 +1,8 @@ name: Build and push DocsGPT-FE Docker image on: - workflow_dispatch: - push: - branches: - - main + release: + types: [published] jobs: deploy: @@ -44,5 +42,7 @@ jobs: context: ./frontend push: true tags: | - ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest - ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest + ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }},${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest + ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }},ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest + cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest + cache-to: type=inline