forked from epam/ai-dial-ci
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (46 loc) · 1.42 KB
/
e2e-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Run e2e-tests
on:
workflow_call:
inputs:
gitlab-project-id:
required: true
description: "The ID or path of the project owned by the authenticated user."
type: string
gitlab-project-ref:
default: "master"
description: "The branch or tag to run the pipeline on."
type: string
secrets:
DEPLOY_HOST:
required: true
DEPLOY_TRIGGER_TOKEN:
required: true
DEPLOY_ACCESS_TOKEN:
required: true
jobs:
trigger-pipeline:
runs-on: ubuntu-latest
concurrency: e2e-test
environment:
name: e2e-test
steps:
- name: Obtain short sha
id: sha
shell: bash
run: |
# shorten the commit SHA to the first 7 characters
echo "SHA=${GITHUB_SHA:0:7}" >>$GITHUB_OUTPUT
- name: Deploy environment
id: deploy
uses: digital-blueprint/gitlab-pipeline-trigger-action@7fef6b4967aef68a1671ccf42a6e45f7a27487d8 # v1.2.0
with:
host: ${{ secrets.DEPLOY_HOST }}
trigger_token: ${{ secrets.DEPLOY_TRIGGER_TOKEN }}
access_token: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
id: ${{ inputs.gitlab-project-id }}
ref: ${{ inputs.gitlab-project-ref }}
variables: >
{
"TRIGGER_GITHUB_APP":"${{ github.event.repository.name }}",
"TRIGGER_GITHUB_SHA": "${{ steps.sha.outputs.SHA }}"
}