fix: stripe agent #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
paths: | |
- app/** | |
- .github/** | |
branches: | |
- master | |
name: Main | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
# needs: | |
# - Tests | |
# - Lint | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get repository | |
uses: actions/checkout@v4 | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64 | |
push: true | |
context: . | |
#target: chatbot | |
tags: myteslamate/chatbot:bot-${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
Deploy: | |
runs-on: ubuntu-latest | |
needs: | |
- Build | |
steps: | |
- name: Install ArgoCD | |
run: | | |
curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 | |
chmod +x /usr/local/bin/argocd | |
- name: Login to ArgoCD | |
run: argocd login ${{ secrets.ARGOCD_HOST }} --insecure --username ${{ secrets.ARGOCD_USER }} --password ${{ secrets.ARGOCD_TOKEN }} | |
- name: Change Chatbot image in ArgoCD | |
run: argocd app set chatbot -p global.tag=bot-${{ github.sha }} | |
- name: 🚀 Deploy Chatbot | |
run: argocd app sync chatbot --prune |