production.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. "on":
  2. push:
  3. tags:
  4. - production
  5. name: Deploy Porter to Production
  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: Update Porter API
  41. timeout-minutes: 20
  42. uses: porter-dev/porter-update-action@v0.1.0
  43. with:
  44. app: porter-ui
  45. cluster: "9"
  46. host: https://dashboard.internal-tools.porter.run
  47. namespace: default
  48. project: "5"
  49. tag: ${{ steps.vars.outputs.sha_short }}
  50. token: ${{ secrets.PORTER_TOKEN_5 }}
  51. - name: Update Porter Auth
  52. timeout-minutes: 20
  53. uses: porter-dev/porter-update-config-action@v0.1.0
  54. with:
  55. app: porter-auth
  56. cluster: "9"
  57. host: https://dashboard.internal-tools.porter.run
  58. namespace: default
  59. project: "5"
  60. tag: ${{ steps.vars.outputs.sha_short }}
  61. token: ${{ secrets.PORTER_TOKEN_5 }}
  62. deploy-worker-pool:
  63. runs-on: ubuntu-latest
  64. needs: [build-go, build-npm] # don't run this step unless these finish successfully
  65. steps:
  66. - name: Checkout code
  67. uses: actions/checkout@v3
  68. - name: Set Github tag
  69. id: vars
  70. run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
  71. - name: Update Worker Pool (revision cull job)
  72. timeout-minutes: 20
  73. uses: porter-dev/porter-update-action@v0.1.0
  74. with:
  75. app: cull-helm-revisions
  76. cluster: "9"
  77. host: https://dashboard.internal-tools.porter.run
  78. namespace: default
  79. project: "5"
  80. tag: ${{ steps.vars.outputs.sha_short }}
  81. token: ${{ secrets.PORTER_TOKEN_5 }}