From 776cecc3efa346392abd28fd22ba61831460d664 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Tue, 13 Jun 2023 22:16:26 -0400 Subject: [PATCH] create prod release action --- ...age.yml => build-docker-image-to-prod.yml} | 39 +------------------ .github/workflows/build-staging-img.yml | 7 +--- 2 files changed, 2 insertions(+), 44 deletions(-) rename .github/workflows/{docker-image.yml => build-docker-image-to-prod.yml} (73%) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/build-docker-image-to-prod.yml similarity index 73% rename from .github/workflows/docker-image.yml rename to .github/workflows/build-docker-image-to-prod.yml index 87797c5f7..322a553c4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/build-docker-image-to-prod.yml @@ -1,4 +1,4 @@ -name: Build, Publish and Deploy to Gamma +name: Release production images (frontend, backend) on: push: tags: @@ -116,40 +116,3 @@ jobs: platforms: linux/amd64,linux/arm64 build-args: | POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }} - gamma-deployment: - name: Deploy to gamma - runs-on: ubuntu-latest - needs: [frontend-image, backend-image] - steps: - - name: ☁️ Checkout source - uses: actions/checkout@v3 - - name: Install Helm - uses: azure/setup-helm@v3 - with: - version: v3.10.0 - - name: Install infisical helm chart - run: | - helm repo add infisical-helm-charts 'https://dl.cloudsmith.io/public/infisical/helm-charts/helm/charts/' - helm repo update - - name: Install kubectl - uses: azure/setup-kubectl@v3 - - name: Install doctl - uses: digitalocean/action-doctl@v2 - with: - token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} - - name: Save DigitalOcean kubeconfig with short-lived credentials - run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 k8s-1-25-4-do-0-nyc1-1670645170179 - - name: switch to gamma namespace - run: kubectl config set-context --current --namespace=gamma - - name: test kubectl - run: kubectl get ingress - - name: Download helm values to file and upgrade gamma deploy - run: | - wget https://raw.githubusercontent.com/Infisical/infisical/main/.github/values.yaml - helm upgrade infisical infisical-helm-charts/infisical --values values.yaml --recreate-pods - if [[ $(helm status infisical) == *"FAILED"* ]]; then - echo "Helm upgrade failed" - exit 1 - else - echo "Helm upgrade was successful" - fi diff --git a/.github/workflows/build-staging-img.yml b/.github/workflows/build-staging-img.yml index 73295fc54..0e50d0906 100644 --- a/.github/workflows/build-staging-img.yml +++ b/.github/workflows/build-staging-img.yml @@ -1,10 +1,5 @@ name: Build, Publish and Deploy to Gamma -on: - workflow_dispatch: - push: - paths: - - "backend/**" - - "frontend/**" +on: [workflow_dispatch] jobs: backend-image: