porter_stack_porter-sandbox.yml 1.4 KB

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