From 480d91e81804871aa68e3ad2ea2809c6c2a83155 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 4 Mar 2023 11:35:03 +0000 Subject: [PATCH] Update cife.yml --- .github/workflows/cife.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/cife.yml diff --git a/.github/workflows/cife.yml b/.github/workflows/cife.yml new file mode 100644 index 00000000..8e5149ea --- /dev/null +++ b/.github/workflows/cife.yml @@ -0,0 +1,44 @@ +name: Build and push DocsGPT-FE Docker image + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to ghcr.io + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_TOKEN }} + + # Runs a single command using the runners shell + - name: Build and push Docker images to docker.io and ghcr.io + uses: docker/build-push-action@v2 + with: + file: './frontend/Dockerfile' + platforms: linux/amd64 + context: ./frontend + push: true + tags: | + ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest + ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest