-
Notifications
You must be signed in to change notification settings - Fork 75
39 lines (37 loc) · 1.23 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request_target:
branches:
- 'main'
types:
# Adding 'labeled' to the list of activity types that trigger this event
# (default: opened, synchronize, reopened) so that we can run this
# workflow when the 'ok-to-test' label is added.
# Reference: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
- opened
- synchronize
- reopened
- labeled
jobs:
lowercase-repo:
name: Lowercase Repo
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
repository: ${{ steps.lowercase_repository.outputs.repository }}
steps:
- id: lowercase_repository
run: echo "repository=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
e2e-test:
needs: lowercase-repo
name: E2E Test
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') || github.event_name == 'push' }}
uses: ./.github/workflows/ci-e2e.yml
with:
commit-hash: ${{ github.event.pull_request.head.sha || github.sha }}
image-tag: ${{ github.event.pull_request.number || 'default' }}
github-repository: ${{ needs.lowercase-repo.outputs.repository }}
secrets: inherit