Skip to content

Commit 3bcb8ae

Browse files
author
Petr Sramek
committed
tests
1 parent 5b0152b commit 3bcb8ae

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ on:
88
paths:
99
- 'src/**'
1010
workflow_call:
11+
inputs:
12+
# Required
13+
run-id:
14+
description: 'Path to the configuration file.'
15+
type: string
16+
required: true
17+
run-number:
18+
description: 'The run number of the parent workflow.'
19+
type: string
20+
required: true
1121
outputs:
1222
package-artifact-name:
1323
description: "The assembly version."
@@ -34,15 +44,15 @@ jobs:
3444
runs-on: ubuntu-latest
3545

3646
outputs:
37-
github-run-id: ${{ github.run_id }}
38-
github-run-number: ${{ github.run_number }}
47+
github-run-id: ${{ inputs.run-id || github.run_id }}
48+
github-run-number: ${{ inputs.run-number || github.run_number }}
3949

4050
steps:
4151
- name: 'Global variables'
4252
id: github
4353
run: |
44-
echo "github-run-id:${{ github.run_id }}"
45-
echo "github-run-number:${{ github.run_number }}"
54+
echo "github-run-id:${{ inputs.run-id || github.run_id }}"
55+
echo "github-run-number:${{ inputs.run-number || github.run_number }}"
4656
4757
versioning:
4858
name: Versioning with GitVersion
@@ -152,7 +162,6 @@ jobs:
152162
uses: ./.github/workflows/publish-nuget-package.yml
153163
needs: [global-variables, pack]
154164

155-
156165
secrets: inherit
157166

158167
with:

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@ jobs:
2828
echo "github-run-id:${{ github.run_id }}"
2929
echo "github-run-number:${{ github.run_number }}"
3030
31+
build:
32+
name: Build
33+
uses: ./.github/workflows/build.yml
34+
35+
secrets: inherit
36+
3137
validate:
3238
name: 'Validate'
39+
needs: [build]
3340
runs-on: ubuntu-latest
3441

3542
steps:
@@ -40,14 +47,10 @@ jobs:
4047
shell: bash
4148
run: dotnet format analyzers --severity warn --verify-no-changes
4249

43-
build:
44-
name: Build
45-
uses: ./.github/workflows/build.yml
46-
4750
publish-package:
4851
name: 'Publish'
4952
uses: ./.github/workflows/publish-nuget-package.yml
50-
needs: [global-variables, build]
53+
needs: [global-variables, validate]
5154

5255
secrets: inherit
5356

0 commit comments

Comments
 (0)