-
Notifications
You must be signed in to change notification settings - Fork 5
85 lines (69 loc) · 2.66 KB
/
Copy pathpr-fork-build.yml
File metadata and controls
85 lines (69 loc) · 2.66 KB
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
name: PR Builds
on:
pull_request:
jobs:
build_docker:
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up QEMU (multi-arch emulation)
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build container image (no push)
run: |
docker buildx build \
--file DeveLanCacheUI_Backend/Dockerfile \
--platform linux/arm64,linux/amd64 \
-t develancacheui_backend:test-pr .
build_linux:
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore
run: dotnet restore DeveLanCacheUI_Backend.sln
- name: Build
run: dotnet build DeveLanCacheUI_Backend.sln -c Release --no-restore
- name: Test
run: dotnet test DeveLanCacheUI_Backend.sln -c Release --no-build --verbosity normal
build_windows:
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore
run: dotnet restore DeveLanCacheUI_Backend.sln
- name: Build
run: dotnet build DeveLanCacheUI_Backend.sln -c Release --no-restore
- name: Test
run: dotnet test DeveLanCacheUI_Backend.sln -c Release --no-build --verbosity normal
log_pr_info:
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Log PR event context
run: |
echo "PR Number: ${{ github.event.pull_request.number }}"
echo "PR Title: ${{ github.event.pull_request.title }}"
echo "PR Head Repo: ${{ github.event.pull_request.head.repo.full_name }}"
echo "PR Head Ref: ${{ github.event.pull_request.head.ref }}"
echo "PR Base Repo: ${{ github.event.pull_request.base.repo.full_name }}"
echo "PR Base Ref: ${{ github.event.pull_request.base.ref }}"
echo "PR User Login: ${{ github.event.pull_request.user.login }}"
echo "Full github.event context:"
echo '${{ toJson(github.event) }}'