summaryrefslogtreecommitdiff
path: root/.github/workflows/pr-preview-destroy.yml
blob: 49f1ba8a340a624bfdba190d1b6af29b465d5156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# file: .github/workflows/preview-closed.yaml
on:
  pull_request:
    types:
      - closed

name: Destroy preview environment

jobs:
  destroy-preview-environment:
    runs-on: ubuntu-latest
    if: github.repository == github.event.pull_request.head.repo.full_name
    steps:
      - name: Context
        uses: okteto/context@latest
        with:
          token: ${{ secrets.OKTETO_TOKEN }}

      - name: Destroy preview environment
        uses: okteto/destroy-preview@latest
        with:
          name: pr-${{ github.event.number }}-syuilo