Skip to content

Commit 0de54f4

Browse files
committed
feat(workflows): Add workflows for http-dotnet8.0 example
Signed-off-by: Ada Rotunjanu <[email protected]>
1 parent f079011 commit 0de54f4

File tree

2 files changed

+146
-0
lines changed

2 files changed

+146
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: examples/http-dotnet8.0 (stable)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
branches: [ada-dev1419/http-dotnet8.0]
8+
paths:
9+
- '.github/workflows/example-http-dotnet80-stable.yaml'
10+
- 'http-dotnet8.0/**'
11+
- '!http-dotnet8.0/README.md'
12+
13+
pull_request:
14+
types: [opened, synchronize, reopened]
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/example-http-dotnet80-stable.yaml'
18+
- 'http-dotnet8.0/**'
19+
- '!http-dotnet8.0/README.md'
20+
21+
schedule:
22+
- cron: '0 15 * * 1-5'
23+
24+
# Automatically cancel in-progress actions on the same branch
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
27+
cancel-in-progress: true
28+
29+
env:
30+
UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1"
31+
UKC_TOKEN: ${{ secrets.UKC_TOKEN }}
32+
KRAFTKIT_NO_CHECK_UPDATES: true
33+
KRAFTKIT_LOG_LEVEL: debug
34+
35+
jobs:
36+
integration:
37+
timeout-minutes: 60
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Test
44+
id: test
45+
uses: unikraft/kraftkit@staging
46+
with:
47+
run: |
48+
set -xe;
49+
cd http-dotnet8.0;
50+
kraft cloud deploy \
51+
--no-start \
52+
--memory 512 \
53+
--name http-dotnet80-${GITHUB_RUN_ID} \
54+
--runtime index.unikraft.io/official-testing/base-compat:latest \
55+
--subdomain http-dotnet80-${GITHUB_RUN_ID} \
56+
-p 443:8080 \
57+
.;
58+
# wait for the instance to start
59+
kraft cloud vm start -w 5s http-dotnet80-${GITHUB_RUN_ID};
60+
sleep 5;
61+
curl -Lv --fail-with-body --max-time 10 https://http-dotnet80-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app
62+
63+
- name: Cleanup
64+
uses: unikraft/kraftkit@staging
65+
if: always()
66+
with:
67+
run: |
68+
set -xe;
69+
kraft cloud vm stop http-dotnet80-${GITHUB_RUN_ID} || true;
70+
kraft cloud vm logs http-dotnet80-${GITHUB_RUN_ID} || true;
71+
kraft cloud vm rm http-dotnet80-${GITHUB_RUN_ID} || true;
72+
kraft cloud img rm index.unikraft.io/test/http-dotnet80-${GITHUB_RUN_ID} || true;
73+
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: examples/http-dotnet8.0 (staging)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
branches: [ada-dev1419/http-dotnet8.0]
8+
paths:
9+
- '.github/workflows/example-http-dotnet80-staging.yaml'
10+
- 'http-dotnet8.0/**'
11+
- '!http-dotnet8.0/README.md'
12+
13+
pull_request:
14+
types: [opened, synchronize, reopened]
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/example-http-dotnet80-staging.yaml'
18+
- 'http-dotnet8.0/**'
19+
- '!http-dotnet8.0/README.md'
20+
21+
schedule:
22+
- cron: '0 15 * * 1-5'
23+
24+
# Automatically cancel in-progress actions on the same branch
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
27+
cancel-in-progress: true
28+
29+
env:
30+
UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1"
31+
UKC_TOKEN: ${{ secrets.UKC_TOKEN }}
32+
KRAFTKIT_NO_CHECK_UPDATES: true
33+
KRAFTKIT_LOG_LEVEL: debug
34+
35+
jobs:
36+
integration:
37+
timeout-minutes: 60
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Test
44+
id: test
45+
uses: unikraft/kraftkit@staging
46+
with:
47+
run: |
48+
set -xe;
49+
cd http-dotnet8.0;
50+
kraft cloud deploy \
51+
--no-start \
52+
--memory 512 \
53+
--name http-dotnet80-${GITHUB_RUN_ID} \
54+
--runtime index.unikraft.io/official-staging/base-compat:latest \
55+
--subdomain http-dotnet80-${GITHUB_RUN_ID} \
56+
-p 443:8080 \
57+
.;
58+
# wait for the instance to start
59+
kraft cloud vm start -w 5s http-dotnet80-${GITHUB_RUN_ID};
60+
sleep 5;
61+
curl -Lv --fail-with-body --max-time 10 https://http-dotnet80-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app
62+
63+
- name: Cleanup
64+
uses: unikraft/kraftkit@staging
65+
if: always()
66+
with:
67+
run: |
68+
set -xe;
69+
kraft cloud vm stop http-dotnet80-${GITHUB_RUN_ID} || true;
70+
kraft cloud vm logs http-dotnet80-${GITHUB_RUN_ID} || true;
71+
kraft cloud vm rm http-dotnet80-${GITHUB_RUN_ID} || true;
72+
kraft cloud img rm index.unikraft.io/test/http-dotnet80-${GITHUB_RUN_ID} || true;
73+

0 commit comments

Comments
 (0)