action.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ---
  2. name: 'porter-deploy'
  3. description: deploys porter
  4. inputs:
  5. app:
  6. description: 'app to deploy'
  7. required: true
  8. cluster:
  9. description: 'cluster to deploy to'
  10. required: true
  11. host:
  12. description: 'project to deploy to'
  13. required: true
  14. project:
  15. description: 'project to deploy to'
  16. required: true
  17. token:
  18. description: 'porter deploy api token'
  19. required: true
  20. runs:
  21. using: "composite"
  22. steps:
  23. - name: Get Go Binaries
  24. uses: actions/download-artifact@v3
  25. with:
  26. name: go-binaries
  27. path: bin/
  28. - name: Get NPM static files
  29. uses: actions/download-artifact@v3
  30. with:
  31. name: npm-static-files
  32. path: build/
  33. - name: Set Github tag
  34. shell: bash
  35. id: vars
  36. run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
  37. - name: Deploy stack
  38. uses: porter-dev/porter-cli-action@v0.1.0
  39. with:
  40. command: apply
  41. env:
  42. PORTER_CLUSTER: "${{ inputs.cluster }}"
  43. PORTER_HOST: "${{ inputs.host }}"
  44. PORTER_PROJECT: "${{ inputs.project }}"
  45. PORTER_STACK_NAME: "${{ inputs.app }}"
  46. PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
  47. PORTER_TOKEN: "${{ inputs.token }}"