Skip to content

Commit 65c588b

Browse files
committed
ci(workflows): Improve GitHub Actions YAML formatting and update action versions
Correct step indentation and remove extraneous hyphens across all workflow and composite action definitions.
1 parent 3962604 commit 65c588b

File tree

25 files changed

+626
-661
lines changed

25 files changed

+626
-661
lines changed

.github/actions/artifacts-attest/action.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ description: 'Artifacts attestation'
44
runs:
55
using: 'composite'
66
steps:
7-
-
8-
name: 'Attestation'
9-
uses: actions/attest-build-provenance@v2.0.1
10-
with:
11-
subject-path: |
12-
${{ github.workspace }}/artifacts/packages/native
13-
${{ github.workspace }}/artifacts/packages/nuget
7+
- name: 'Attestation'
8+
uses: actions/attest-build-provenance@v4.1.0
9+
with:
10+
subject-path: |
11+
${{ github.workspace }}/artifacts/packages/native
12+
${{ github.workspace }}/artifacts/packages/nuget

.github/actions/artifacts-restore/action.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,26 @@ description: 'Artifacts restore'
44
runs:
55
using: 'composite'
66
steps:
7-
-
8-
uses: actions/download-artifact@v4
9-
name: Download native linux packages
10-
with:
11-
name: native-Linux
12-
path: ${{ github.workspace }}/artifacts/packages/native
13-
-
14-
uses: actions/download-artifact@v4
15-
name: Download native windows packages
16-
with:
17-
name: native-Windows
18-
path: ${{ github.workspace }}/artifacts/packages/native
19-
-
20-
uses: actions/download-artifact@v4
21-
name: Download native macos packages
22-
with:
23-
name: native-macOS
24-
path: ${{ github.workspace }}/artifacts/packages/native
25-
-
26-
uses: actions/download-artifact@v4
27-
name: Download nuget packages
28-
with:
29-
name: nuget
30-
path: ${{ github.workspace }}/artifacts/packages/nuget
7+
- uses: actions/download-artifact@v8
8+
name: Download native linux packages
9+
with:
10+
name: native-Linux
11+
path: ${{ github.workspace }}/artifacts/packages/native
12+
13+
- uses: actions/download-artifact@v8
14+
name: Download native windows packages
15+
with:
16+
name: native-Windows
17+
path: ${{ github.workspace }}/artifacts/packages/native
18+
19+
- uses: actions/download-artifact@v8
20+
name: Download native macos packages
21+
with:
22+
name: native-macOS
23+
path: ${{ github.workspace }}/artifacts/packages/native
24+
25+
- uses: actions/download-artifact@v8
26+
name: Download nuget packages
27+
with:
28+
name: nuget
29+
path: ${{ github.workspace }}/artifacts/packages/nuget

.github/actions/cache-restore/action.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ description: 'Cache restore'
44
runs:
55
using: 'composite'
66
steps:
7-
-
8-
name: Use cached cake frosting
9-
id: cache-cake
10-
uses: actions/cache@v5
11-
with:
12-
path: run
13-
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
14-
-
15-
name: Use cached tools
16-
id: cache-tools
17-
uses: actions/cache@v5
18-
with:
19-
path: tools
20-
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
21-
-
22-
name: Setup .NET SDK
23-
uses: actions/setup-dotnet@v5
24-
with:
25-
global-json-file: global.json
7+
- name: Use cached cake frosting
8+
id: cache-cake
9+
uses: actions/cache@v5
10+
with:
11+
path: run
12+
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
13+
14+
- name: Use cached tools
15+
id: cache-tools
16+
uses: actions/cache@v5
17+
with:
18+
path: tools
19+
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
20+
21+
- name: Setup .NET SDK
22+
uses: actions/setup-dotnet@v5
23+
with:
24+
global-json-file: global.json

.github/actions/docker-manifests/action.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,29 @@ inputs:
2323
runs:
2424
using: 'composite'
2525
steps:
26-
-
27-
name: Login to DockerHub
28-
uses: docker/login-action@v4
29-
with:
30-
username: ${{ inputs.docker_registry_username }}
31-
password: ${{ inputs.docker_registry_password }}
32-
-
33-
name: '[Docker Publish Manifests] DockerHub'
34-
shell: pwsh
35-
run: |
26+
- name: Login to DockerHub
27+
uses: docker/login-action@v4
28+
with:
29+
username: ${{ inputs.docker_registry_username }}
30+
password: ${{ inputs.docker_registry_password }}
31+
32+
- name: '[Docker Publish Manifests] DockerHub'
33+
shell: pwsh
34+
run: |
3635
dotnet run/docker.dll `
3736
--target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnet_version }} `
3837
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub
39-
-
40-
name: Login to GitHub
41-
uses: docker/login-action@v4
42-
with:
43-
registry: ghcr.io
44-
username: ${{ inputs.github_registry_username }}
45-
password: ${{ inputs.github_registry_password }}
46-
-
47-
name: '[Docker Publish Manifests] GitHub'
48-
shell: pwsh
49-
run: |
38+
39+
- name: Login to GitHub
40+
uses: docker/login-action@v4
41+
with:
42+
registry: ghcr.io
43+
username: ${{ inputs.github_registry_username }}
44+
password: ${{ inputs.github_registry_password }}
45+
46+
- name: '[Docker Publish Manifests] GitHub'
47+
shell: pwsh
48+
run: |
5049
dotnet run/docker.dll `
5150
--target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnet_version }} `
5251
--docker_distro=${{ inputs.docker_distro }} --docker_registry github

.github/actions/docker-publish/action.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,29 @@ inputs:
2626
runs:
2727
using: 'composite'
2828
steps:
29-
-
30-
name: Login to DockerHub
31-
uses: docker/login-action@v4
32-
with:
33-
username: ${{ inputs.docker_registry_username }}
34-
password: ${{ inputs.docker_registry_password }}
35-
-
36-
name: '[Docker Publish] DockerHub'
37-
shell: pwsh
38-
run: |
29+
- name: Login to DockerHub
30+
uses: docker/login-action@v4
31+
with:
32+
username: ${{ inputs.docker_registry_username }}
33+
password: ${{ inputs.docker_registry_password }}
34+
35+
- name: '[Docker Publish] DockerHub'
36+
shell: pwsh
37+
run: |
3938
dotnet run/docker.dll `
4039
--target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
4140
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic
42-
-
43-
name: Login to GitHub
44-
uses: docker/login-action@v4
45-
with:
46-
registry: ghcr.io
47-
username: ${{ inputs.github_registry_username }}
48-
password: ${{ inputs.github_registry_password }}
49-
-
50-
name: '[Docker Publish] GitHub'
51-
shell: pwsh
52-
run: |
41+
42+
- name: Login to GitHub
43+
uses: docker/login-action@v4
44+
with:
45+
registry: ghcr.io
46+
username: ${{ inputs.github_registry_username }}
47+
password: ${{ inputs.github_registry_password }}
48+
49+
- name: '[Docker Publish] GitHub'
50+
shell: pwsh
51+
run: |
5352
dotnet run/docker.dll `
5453
--target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
5554
--docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic

.github/actions/docker-setup/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: 'Docker Setup'
22
description: 'Setups the docker engine'
33

44
runs:
5-
using: 'composite'
6-
steps:
7-
- name: Set up Docker
8-
uses: docker/setup-docker-action@v5
9-
with:
10-
daemon-config: '{ "features": { "containerd-snapshotter": true } }'
5+
using: 'composite'
6+
steps:
7+
- name: Set up Docker
8+
uses: docker/setup-docker-action@v5
9+
with:
10+
daemon-config: '{ "features": { "containerd-snapshotter": true } }'

.github/actions/docker-test/action.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,26 @@ inputs:
1414
runs:
1515
using: 'composite'
1616
steps:
17-
-
18-
name: '[Docker Build & Test] DockerHub'
19-
uses: nick-fields/retry@v3
20-
with:
21-
shell: pwsh
22-
timeout_minutes: 30
23-
max_attempts: 3
24-
retry_on: error
25-
command: |
26-
dotnet run/docker.dll --target=DockerTest `
27-
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
28-
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic
29-
-
30-
name: '[Docker Build & Test] GitHub'
31-
uses: nick-fields/retry@v3
32-
with:
33-
shell: pwsh
34-
timeout_minutes: 30
35-
max_attempts: 3
36-
retry_on: error
37-
command: |
38-
dotnet run/docker.dll --target=DockerTest `
39-
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
40-
--docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic
17+
- name: '[Docker Build & Test] DockerHub'
18+
uses: nick-fields/retry@v3
19+
with:
20+
shell: pwsh
21+
timeout_minutes: 30
22+
max_attempts: 3
23+
retry_on: error
24+
command: |
25+
dotnet run/docker.dll --target=DockerTest `
26+
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
27+
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic
28+
29+
- name: '[Docker Build & Test] GitHub'
30+
uses: nick-fields/retry@v3
31+
with:
32+
shell: pwsh
33+
timeout_minutes: 30
34+
max_attempts: 3
35+
retry_on: error
36+
command: |
37+
dotnet run/docker.dll --target=DockerTest `
38+
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
39+
--docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic

.github/workflows/_artifacts_linux.yml

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -28,39 +28,38 @@ jobs:
2828
docker_distro: ${{ fromJson(inputs.docker_distros) }}
2929
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
3030
steps:
31-
-
32-
name: Checkout
33-
uses: actions/checkout@v6
34-
with:
35-
fetch-depth: 0
36-
-
37-
name: Restore State
38-
uses: ./.github/actions/cache-restore
39-
-
40-
uses: actions/download-artifact@v8
41-
name: Download nuget packages
42-
with:
43-
name: nuget
44-
path: ${{ github.workspace }}/artifacts/packages/nuget
45-
-
46-
uses: actions/download-artifact@v8
47-
name: Download native packages
48-
with:
49-
name: native-Linux
50-
path: ${{ github.workspace }}/artifacts/packages/native
51-
-
52-
name: Set up Docker
53-
uses: ./.github/actions/docker-setup
54-
-
55-
name: '[Test Artifacts]'
56-
uses: nick-fields/retry@v3
57-
with:
58-
shell: pwsh
59-
timeout_minutes: 30
60-
max_attempts: 3
61-
retry_on: error
62-
command: |
63-
dotnet run/artifacts.dll `
64-
--target=ArtifactsTest --arch=${{ inputs.arch }} `
65-
--dotnet_version=${{ matrix.dotnet_version }} `
66-
--docker_distro=${{ matrix.docker_distro }}
31+
- name: Checkout
32+
uses: actions/checkout@v6
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Restore State
37+
uses: ./.github/actions/cache-restore
38+
39+
- uses: actions/download-artifact@v8
40+
name: Download nuget packages
41+
with:
42+
name: nuget
43+
path: ${{ github.workspace }}/artifacts/packages/nuget
44+
45+
- uses: actions/download-artifact@v8
46+
name: Download native packages
47+
with:
48+
name: native-Linux
49+
path: ${{ github.workspace }}/artifacts/packages/native
50+
51+
- name: Set up Docker
52+
uses: ./.github/actions/docker-setup
53+
54+
- name: '[Test Artifacts]'
55+
uses: nick-fields/retry@v3
56+
with:
57+
shell: pwsh
58+
timeout_minutes: 30
59+
max_attempts: 3
60+
retry_on: error
61+
command: |
62+
dotnet run/artifacts.dll `
63+
--target=ArtifactsTest --arch=${{ inputs.arch }} `
64+
--dotnet_version=${{ matrix.dotnet_version }} `
65+
--docker_distro=${{ matrix.docker_distro }}

.github/workflows/_artifacts_windows.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,20 @@ jobs:
1515
package: [ Executable, MsBuildFull ]
1616

1717
steps:
18-
-
19-
name: Checkout
20-
uses: actions/checkout@v6
21-
with:
22-
fetch-depth: 0
23-
-
24-
name: Restore State
25-
uses: ./.github/actions/cache-restore
26-
-
27-
uses: actions/download-artifact@v8
28-
name: Download nuget packages
29-
with:
30-
name: nuget
31-
path: ${{ github.workspace }}/artifacts/packages/nuget
32-
-
33-
name: '[Test Artifacts]'
34-
shell: pwsh
35-
run: dotnet run/artifacts.dll --target=Artifacts${{ matrix.package }}Test
18+
- name: Checkout
19+
uses: actions/checkout@v6
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Restore State
24+
uses: ./.github/actions/cache-restore
25+
26+
- uses: actions/download-artifact@v8
27+
name: Download nuget packages
28+
with:
29+
name: nuget
30+
path: ${{ github.workspace }}/artifacts/packages/nuget
31+
32+
- name: '[Test Artifacts]'
33+
shell: pwsh
34+
run: dotnet run/artifacts.dll --target=Artifacts${{ matrix.package }}Test

0 commit comments

Comments
 (0)