-
Notifications
You must be signed in to change notification settings - Fork 58
51 lines (47 loc) · 1.8 KB
/
e2e-test-bridge.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
49
50
51
name: Bridge e2e test
on:
workflow_run:
workflows: [CI]
branches: [master]
types: [completed]
workflow_dispatch:
inputs:
run_sha:
description: "Sha commit from which artifacts are taken"
required: true
jobs:
e2e-bridge-test:
if: ${{ github.event_name == 'merge_group' }}
runs-on: self-hosted
steps:
- name: Retrieve run id
id: retrieve-run-id
run: |
if [[ -n "${{ github.event_name == 'workflow_dispatch' }}" ]]; then
echo "run_sha=${{ github.event.inputs.run_sha }}" >> $GITHUB_OUTPUT
else
echo "run_sha=${{ github.event.workflow_run.head_sha }}" >> $GITHUB_OUTPUT
fi
- name: Recognize sha ref
id: sharef
run: |
if [ ${{ github.event_name }} == 'pull_request' ]
then
echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})"
elif [ ${{ github.event_name }} == 'workflow_run' ]
then
echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})"
else
echo "::set-output name=sha::$(echo $GITHUB_SHA)"
fi
- name: Checkout
uses: actions/checkout@v4
- name: Run Zombienet Test ${{ matrix.test_name }}
uses: ./.github/workflow-templates/bridge-e2e
- name: Commit Action Status
uses: LouisBrunner/[email protected]
with:
sha: ${{ steps.sharef.outputs.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
name: Bridge e2e test
conclusion: ${{ job.status }}