porter_stack_porter-sandbox.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. on:
  2. push:
  3. tags:
  4. - production
  5. name: Deploy to porter-cloud
  6. jobs:
  7. build-go:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Checkout code
  11. uses: actions/checkout@v3
  12. - name: build-go
  13. uses: ./.github/actions/build-go
  14. build-npm:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - name: Checkout code
  18. uses: actions/checkout@v3
  19. - name: build-npm
  20. uses: ./.github/actions/build-npm
  21. with:
  22. env_vars: ${{ vars.DASHBOARD_ENV_SANDBOX }}
  23. porter-deploy:
  24. runs-on: ubuntu-latest
  25. needs: [build-go, build-npm]
  26. steps:
  27. - name: Checkout code
  28. uses: actions/checkout@v3
  29. - name: Get Go Binaries
  30. uses: actions/download-artifact@v3
  31. with:
  32. name: go-binaries
  33. path: bin/
  34. - name: Get NPM static files
  35. uses: actions/download-artifact@v3
  36. with:
  37. name: npm-static-files
  38. path: build/
  39. - name: Set Github tag
  40. id: vars
  41. run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
  42. - name: Setup porter
  43. uses: porter-dev/setup-porter@v0.1.0
  44. - name: Deploy stack
  45. timeout-minutes: 30
  46. run: exec porter apply -f ./porter.yaml --wait
  47. env:
  48. PORTER_CLUSTER: "11"
  49. PORTER_HOST: https://dashboard.internal-tools.porter.run
  50. PORTER_PR_NUMBER: ${{ github.event.number }}
  51. PORTER_PROJECT: "8"
  52. PORTER_STACK_NAME: porter-sandbox
  53. PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
  54. PORTER_TOKEN: ${{ secrets.PORTER_STACK_8_11 }}