From 12256b5059032f2ce60b55ea34768d3ec3c8d4ba Mon Sep 17 00:00:00 2001 From: badhezi Date: Fri, 6 Dec 2024 13:08:38 +0700 Subject: [PATCH] add workflows --- .gitea/workflows/gradio-text-chatbot.yaml | 55 +++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .gitea/workflows/gradio-text-chatbot.yaml diff --git a/.gitea/workflows/gradio-text-chatbot.yaml b/.gitea/workflows/gradio-text-chatbot.yaml new file mode 100644 index 0000000..4bdfedd --- /dev/null +++ b/.gitea/workflows/gradio-text-chatbot.yaml @@ -0,0 +1,55 @@ +name: society-ai-hub-container-cache Actions Demo +run-name: ${{ society-ai-hub-container-cache.actor }} is building an AI Application 🚀 +on: + repository: + + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Login to container registry + uses: docker/login-action@v3 + with: + registry: ${{ vars.ECR_REGISTRY }} + env: + DEBUG: 0 # Suppresses debug output + + - name: Configure credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + env: + ACTIONS_STEP_DEBUG: false # Suppresses debug output + + - name: Set up build emulator + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Minimum output verbosity + + - name: Set up builder + uses: docker/setup-buildx-action@v3 + with: + debug: false # Suppresses debug output + + - name: Build container image + id: docker_build + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + platforms: "linux/amd64" + tags: "${{ vars.ECR_REGISTRY }}/gradio-app:${{ env.REPOSITORY_UUID }}" + cache-from: type=local,src=/tmp/ + cache-to: type=local,dest=/tmp/ + env: + BUILDKIT_PROGRESS: plain # Plain progress to suppress details + + - name: Deploy App + run: | + helm -n default upgrade --install ${{ env.REPOSITORY_UUID }} /charts/gradio-app \ + --set imageDigest=${{ steps.docker_build.outputs.digest }} --set uuid=${{ env.REPOSITORY_UUID }} > /dev/null 2>&1