-
Notifications
You must be signed in to change notification settings - Fork 63
104 lines (100 loc) · 3.23 KB
/
pr-e2e.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: E2E PR Blocking
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- "releases/**"
paths:
- "**.go"
- "**go.mod"
- "**go.sum"
- "<templates|test>/**/*.<yml|yaml>"
- ".github/actions/**/*"
- ".github/workflows/e2e-*"
- ".github/workflows/pr-*"
- "images/caph/**"
- "!**/vendor/**"
- "test/e2e/**"
env:
IMAGE_NAME: caph-staging
REGISTRY: ghcr.io/syself
metadata_flavor: latest=false
metadata_tags: type=ref,event=pr
registry_password: ${{ secrets.GITHUB_TOKEN }}
jobs:
manager-image:
name: Build and push manager image
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Build and push manager image
id: manager-image
uses: ./.github/actions/manager-image
test-release:
name: Test Release
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Test Release
id: manager-image
uses: ./.github/actions/test-release
e2e-hcloud-basic:
name: Test Hcloud Basic
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft
concurrency: ci-${{ github.ref }}-e2e-basic
runs-on: ubuntu-latest
permissions:
# Required for hcloud TPS
id-token: write
needs:
- manager-image
- test-release
steps:
- name: checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run e2e Test
id: e2e
uses: ./.github/actions/e2e
with:
e2e_name: hcloud-basic
e2e_make_target: test-e2e
e2e_hcloud_token: ${{ secrets.HCLOUD_TOKEN }}
e2e-hetzner-basic:
name: Test Hetzner Baremetal Basic
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft
concurrency: ci-${{ github.ref }}-e2e-basic-hetzner
runs-on: ubuntu-latest
permissions:
# Required for hcloud TPS
id-token: write
needs:
- manager-image
- test-release
steps:
- name: checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run e2e Test
id: e2e-bm
uses: ./.github/actions/e2e
with:
e2e_name: hetzner-basic
e2e_make_target: test-e2e-baremetal
e2e_hcloud_token: ${{ secrets.HCLOUD_TOKEN }}
e2e_robot_user: ${{ secrets.HETZNER_ROBOT_USER }}
e2e_robot_password: ${{ secrets.HETZNER_ROBOT_PASSWORD }}
e2e_ssh_pub: ${{ secrets.HETZNER_SSH_PUB }}
e2e_ssh_priv: ${{ secrets.HETZNER_SSH_PRIV }}