From 21e48c4733e85763844affbbabd823ca69e21a52 Mon Sep 17 00:00:00 2001 From: "porter-staging[bot]" <87211919+porter-staging[bot]@users.noreply.github.com> Date: Fri, 13 May 2022 16:58:25 +0000 Subject: [PATCH 1/2] Create porter_preview_env.yml file --- .github/workflows/porter_preview_env.yml | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/porter_preview_env.yml 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 }} From 4a2c6d814d22e1ae23a2f8ed09187b78eef755a0 Mon Sep 17 00:00:00 2001 From: "porter-staging[bot]" <87211919+porter-staging[bot]@users.noreply.github.com> Date: Fri, 13 May 2022 16:58:26 +0000 Subject: [PATCH 2/2] Create porter_preview_delete_env.yml file --- .../workflows/porter_preview_delete_env.yml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/porter_preview_delete_env.yml 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 }}