Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Introduce label to enable test env deployment

Cezary Miącz9d736ea4b6ea
diff --git a/.github/workflows/test-env-cleanup.yml b/.github/workflows/test-env-cleanup.yml
index d73d47b04e..224010690b 100644
--- a/.github/workflows/test-env-cleanup.yml
+++ b/.github/workflows/test-env-cleanup.yml
@@ -3,12 +3,13 @@ name: TEST-ENV-CLEANUP
on:
pull_request:
- # trigger on "edited" to update instance when configuration changes in PR description
- types: [closed]
+ types: [closed, unlabeled]
branches: ["*"]
jobs:
cleanup:
+ name: Remove test environment deployment
+ if: ${{ ((github.event.action == 'unlabeled') && (github.event.label.name == 'test deployment')) || ((github.event.action == 'closed') && contains(github.event.pull_request.labels.*.name, 'test deployment')) }}
runs-on: ubuntu-latest
steps:
- uses: rlespinasse/[email protected]
diff --git a/.github/workflows/test-env-deploy.yml b/.github/workflows/test-env-deploy.yml
index d60888b8c4..705548db0a 100644
--- a/.github/workflows/test-env-deploy.yml
+++ b/.github/workflows/test-env-deploy.yml
@@ -3,12 +3,13 @@ name: TEST-ENV-DEPLOYMENT
on:
pull_request:
- # trigger on "edited" to update instance when configuration changes in PR description
- types: [opened, reopened, synchronize]
+ types: [opened, reopened, synchronize, labeled]
branches: ["*"]
jobs:
deploy:
+ name: Deploy test environment for labeled pull requests
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'test deployment') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2