Skip to content

feat: Add GitHub Actions workflow to trigger IIAB integration tests #1

feat: Add GitHub Actions workflow to trigger IIAB integration tests

feat: Add GitHub Actions workflow to trigger IIAB integration tests #1

name: Trigger Integration Tests
on:
pull_request:
types: [labeled, synchronize]
push:
branches:
- master
jobs:
trigger-on-label:
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test-iiab-integration')
runs-on: ubuntu-latest
steps:
- name: Trigger integration tests
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.INTEGRATION_TEST_PAT }}
repository: ascoderu/iiab-lokole-tests
event-type: test-integration-lokole
client-payload: |
{
"pr_number": ${{ github.event.pull_request.number }},
"ref": "${{ github.event.pull_request.head.ref }}",
"sha": "${{ github.event.pull_request.head.sha }}",
"repo": "${{ github.repository }}"
}
trigger-on-merge:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Trigger post-merge tests
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.INTEGRATION_TEST_PAT }}
repository: ascoderu/iiab-lokole-tests
event-type: lokole-merged
client-payload: |
{
"branch": "${{ github.ref_name }}",
"sha": "${{ github.sha }}",
"repo": "${{ github.repository }}"
}