porter_stack_test-2.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "on":
  2. push:
  3. branches:
  4. - stacks-fix-cli-analytics
  5. name: Deploy to test-2
  6. jobs:
  7. porter-deploy:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Checkout code
  11. uses: actions/checkout@v3
  12. - name: Setup Go
  13. uses: actions/setup-go@v4
  14. with:
  15. go-version-file: go.mod
  16. cache: false
  17. - name: Set Github tag
  18. id: vars
  19. run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
  20. - name: Install Porter
  21. timeout-minutes: 30
  22. run: /bin/bash -c "$(curl -fsSL https://install.porter.run)"
  23. - name: Login
  24. timeout-minutes: 30
  25. run: porter auth login --token $PORTER_TOKEN
  26. env:
  27. PORTER_CLUSTER: 2
  28. PORTER_HOST: https://aebf-160-72-72-58.ngrok-free.app
  29. PORTER_PROJECT: 1
  30. PORTER_STACK_NAME: test-2
  31. PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
  32. PORTER_TOKEN: ${{ secrets.PORTER_STACK_1_2 }}
  33. - name: Deploy stack
  34. timeout-minutes: 30
  35. run: go run ./cli/main.go apply
  36. env:
  37. PORTER_CLUSTER: "2"
  38. PORTER_HOST: https://aebf-160-72-72-58.ngrok-free.app
  39. PORTER_PROJECT: "1"
  40. PORTER_STACK_NAME: test-2
  41. PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
  42. PORTER_TOKEN: ${{ secrets.PORTER_STACK_1_2 }}