chore: add enterprise e2e testing (#1766)

* chore: add enterprise e2e testing

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: add enterprise e2e testing

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: add enterprise e2e testing

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: add enterprise e2e testing

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: add enterprise e2e testing

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: add enterprise e2e testing

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

---------

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
Oliver Bähler
2025-12-02 10:29:22 +01:00
committed by GitHub
parent 0aeac4a414
commit beb1cd3de4

49
.github/workflows/e2e-internal.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: e2e-internal
permissions: {}
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
branches:
- "main"
paths:
- '.github/workflows/e2e.yml'
- '.github/workflows/e2e-internal.yml'
- 'api/**'
- 'controllers/**'
- 'internal/**'
- 'pkg/**'
- 'e2e/*'
- 'Dockerfile'
- 'go.*'
- 'main.go'
- 'Makefile'
jobs:
internal-e2e:
name: Trigger internal E2E Testing
runs-on:
labels: ubuntu-latest
if: github.repository_owner == 'projectcapsule'
steps:
- name: Trigger internal e2e repo
env:
GH_TOKEN: ${{ secrets.INTERNAL_E2E_PAT }}
run: |
if [ -z "${GH_TOKEN}" ]; then
echo "GH_TOKEN is empty; secrets are not available. Skipping."
exit 1
fi
curl -fsS -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GH_TOKEN" \
https://api.github.com/repos/projectcapsule/enterprise-e2e/dispatches \
-d "$(jq -n --arg ref "main" \
--arg pr_number "${{ github.event.pull_request.number }}" \
--arg sha "${{ github.sha }}" \
--arg repo "${{ github.repository }}" \
'{event_type:"internal-e2e", client_payload:{ref:$ref, pr_number:$pr_number, sha:$sha, repo:$repo}}')"