Selaa lähdekoodia

re-add workflow file

Feroze Mohideen 2 vuotta sitten
vanhempi
sitoutus
c411681917
1 muutettua tiedostoa jossa 42 lisäystä ja 0 poistoa
  1. 42 0
      .github/workflows/porter_stack_test-2.yml

+ 42 - 0
.github/workflows/porter_stack_test-2.yml

@@ -0,0 +1,42 @@
+"on":
+  push:
+    branches:
+    - stacks-fix-cli-analytics-2
+name: Deploy to test-2
+jobs:
+  porter-deploy:
+    runs-on: ubuntu-latest
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v3
+    - name: Setup Go
+      uses: actions/setup-go@v4
+      with:
+        go-version-file: go.mod
+        cache: false
+    - name: Set Github tag
+      id: vars
+      run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
+    - name: Install Porter
+      timeout-minutes: 30
+      run: /bin/bash -c "$(curl -fsSL https://install.porter.run)"
+    - name: Login
+      timeout-minutes: 30
+      run: porter auth login --token $PORTER_TOKEN
+      env:
+        PORTER_CLUSTER: 2
+        PORTER_HOST: https://aebf-160-72-72-58.ngrok-free.app
+        PORTER_PROJECT: 1
+        PORTER_STACK_NAME: test-2
+        PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
+        PORTER_TOKEN: ${{ secrets.PORTER_STACK_1_2 }}
+    - name: Deploy stack
+      timeout-minutes: 30
+      run: go run ./cli/main.go apply
+      env:
+        PORTER_CLUSTER: "2"
+        PORTER_HOST: https://aebf-160-72-72-58.ngrok-free.app
+        PORTER_PROJECT: "1"
+        PORTER_STACK_NAME: test-2
+        PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
+        PORTER_TOKEN: ${{ secrets.PORTER_STACK_1_2 }}