diff --git a/.github/workflows/porter_preview_delete_env.yml b/.github/workflows/porter_preview_delete_env.yml new file mode 100644 index 0000000..438cacd --- /dev/null +++ b/.github/workflows/porter_preview_delete_env.yml @@ -0,0 +1,21 @@ +"on": + workflow_dispatch: + inputs: + deployment_id: + description: Deployment ID + required: true + type: number +name: Porter Preview Environment +jobs: + porter-delete-preview: + runs-on: ubuntu-latest + steps: + - name: Delete Porter preview env + timeout-minutes: 30 + uses: porter-dev/porter-delete-preview-action@v0.2.0 + with: + cluster: "83" + deployment_id: ${{ github.event.inputs.deployment_id }} + host: https://dashboard.staging.getporter.dev + project: "72" + token: ${{ secrets.PORTER_TOKEN_72 }} diff --git a/.github/workflows/porter_preview_env.yml b/.github/workflows/porter_preview_env.yml new file mode 100644 index 0000000..1e552c1 --- /dev/null +++ b/.github/workflows/porter_preview_env.yml @@ -0,0 +1,43 @@ +"on": + workflow_dispatch: + inputs: + pr_branch_from: + description: Pull request head branch + required: true + type: string + pr_branch_into: + description: Pull request base branch + required: true + type: string + pr_number: + description: Pull request number + required: true + type: number + pr_title: + description: Pull request title + required: true + type: string +name: Porter Preview Environment +jobs: + porter-preview: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2.3.4 + - name: Create Porter preview env + timeout-minutes: 30 + uses: porter-dev/porter-preview-action@v0.2.0 + with: + action_id: ${{ github.run_id }} + cluster: "83" + host: https://dashboard.staging.getporter.dev + installation_id: "18462798" + namespace: pr-${{ github.event.inputs.pr_number }}-gin-example + pr_branch_from: ${{ github.event.inputs.pr_branch_from }} + pr_branch_into: ${{ github.event.inputs.pr_branch_into }} + pr_id: ${{ github.event.inputs.pr_number }} + pr_name: ${{ github.event.inputs.pr_title }} + project: "72" + repo_name: gin-example + repo_owner: abelanger5 + token: ${{ secrets.PORTER_TOKEN_72 }}