diff --git a/.gitea/workflows/gradio-text-to-image.yaml b/.gitea/workflows/gradio-text-to-image.yaml new file mode 100644 index 0000000..8b2475c --- /dev/null +++ b/.gitea/workflows/gradio-text-to-image.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