File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,17 @@ jobs:
29
29
- name : Checkout code
30
30
uses : actions/checkout@v4
31
31
32
- - name : Build NUnit example
32
+ - name : Build XUnit example
33
33
uses : docker/build-push-action@v4
34
34
with :
35
35
context : ./dotnet-xunit
36
36
file : ./dotnet-xunit/Dockerfile
37
37
push : false
38
38
secrets : |
39
39
"dotenv=${{ secrets.DOTENV }}"
40
+ build-args :
41
+ - GITHUB_RUN_ID=${{ GITHUB_RUN_ID }}
42
+ - GITHUB_RUN_ATTEMPT=${{ GITHUB_RUN_ATTEMPT }}
40
43
41
44
nunit :
42
45
runs-on : ubuntu-latest
52
55
file : ./dotnet-nunit/Dockerfile
53
56
push : false
54
57
secrets : |
55
- "dotenv=${{ secrets.DOTENV }}"
58
+ "dotenv=${{ secrets.DOTENV }}"
Original file line number Diff line number Diff line change @@ -21,5 +21,9 @@ WORKDIR /workspace
21
21
22
22
COPY . .
23
23
24
+ ARG GITHUB_RUN_ID
25
+ ARG GITHUB_RUN_ATTEMPT
26
+ ARG SAUCE_VISUAL_BRANCH_NAME=${GITHUB_RUN_ID}${GITHUB_RUN_ATTEMPT}
27
+
24
28
RUN --mount=type=secret,id=dotenv,target=/workspace/.env env $(cat /workspace/.env | xargs) runme run dotnet-test
25
29
RUN --mount=type=secret,id=dotenv,target=/workspace/.env env $(cat /workspace/.env | xargs) runme run dotnet-test-modified
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public async Task Setup()
30
30
{
31
31
Name = "My Visual Build" ,
32
32
Project = "csharp-project" ,
33
- Branch = "csharp-branch "
33
+ Branch = Environment . GetEnvironmentVariable ( "SAUCE_VISUAL_BRANCH_NAME" ) ?? "main "
34
34
} ) ;
35
35
VisualClient . CaptureDom = true ;
36
36
TestContext . Progress . WriteLine ( $ "Build: { VisualClient . Build . Url } ") ;
You can’t perform that action at this time.
0 commit comments