Skip to content

Commit

Permalink
use snake_case for output variables
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Jan 21, 2025
1 parent 9f656be commit 8b7bbdc
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 62 deletions.
12 changes: 6 additions & 6 deletions .github/actions/docker-manifests/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 'Docker Manifests'
description: 'Docker Publish Manifests'
inputs:
dockerDistro:
docker_distro:
description: 'Linux Distro'
required: true
dotnetVersion:
dotnet_version:
description: '.net version'
required: true
docker_registry_username:
Expand Down Expand Up @@ -34,8 +34,8 @@ runs:
shell: pwsh
run: |
dotnet run/docker.dll `
--target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnetVersion }} `
--docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub
--target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnet_version }} `
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub
-
name: Login to GitHub
uses: docker/login-action@v3
Expand All @@ -48,5 +48,5 @@ runs:
shell: pwsh
run: |
dotnet run/docker.dll `
--target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnetVersion }} `
--docker_distro=${{ inputs.dockerDistro }} --docker_registry github
--target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnet_version }} `
--docker_distro=${{ inputs.docker_distro }} --docker_registry github
12 changes: 6 additions & 6 deletions .github/actions/docker-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ inputs:
arch:
description: 'Docker architecture'
required: true
dockerDistro:
docker_distro:
description: 'Linux Distro'
required: true
dotnetVersion:
dotnet_version:
description: '.net version'
required: true
docker_registry_username:
Expand Down Expand Up @@ -37,8 +37,8 @@ runs:
shell: pwsh
run: |
dotnet run/docker.dll `
--target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} `
--docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub --verbosity=diagnostic
--target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic
-
name: Login to GitHub
uses: docker/login-action@v3
Expand All @@ -51,5 +51,5 @@ runs:
shell: pwsh
run: |
dotnet run/docker.dll `
--target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} `
--docker_distro=${{ inputs.dockerDistro }} --docker_registry github --verbosity=diagnostic
--target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
--docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic
12 changes: 6 additions & 6 deletions .github/actions/docker-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ inputs:
arch:
description: 'Docker architecture'
default: 'amd64'
dockerDistro:
docker_distro:
description: 'Linux Distro'
default: 'debian.12'
dotnetVersion:
dotnet_version:
description: '.net version'
default: '8.0'

Expand All @@ -19,12 +19,12 @@ runs:
shell: pwsh
run: |
dotnet run/docker.dll --target=DockerTest `
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} `
--docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub --verbosity=diagnostic
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic
-
name: '[Docker Build & Test] GitHub'
shell: pwsh
run: |
dotnet run/docker.dll --target=DockerTest `
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} `
--docker_distro=${{ inputs.dockerDistro }} --docker_registry github --verbosity=diagnostic
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
--docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic
16 changes: 8 additions & 8 deletions .github/workflows/_artifacts_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
arch:
required: true
type: string
dockerDistros:
docker_distros:
required: true
type: string
dotnetVersions:
dotnet_versions:
required: true
type: string
env:
Expand All @@ -19,13 +19,13 @@ env:

jobs:
artifacts:
name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }}
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
runs-on: ${{ inputs.runner }}
strategy:
fail-fast: false
matrix:
dockerDistro: ${{ fromJson(inputs.dockerDistros) }}
dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }}
matrix:
docker_distro: ${{ fromJson(inputs.docker_distros) }}
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
steps:
-
name: Checkout
Expand Down Expand Up @@ -55,5 +55,5 @@ jobs:
shell: pwsh
run: |
dotnet run/artifacts.dll `
--target=ArtifactsTest --arch=${{ inputs.arch }} --dotnet_version=${{ matrix.dotnetVersion }} `
--docker_distro=${{ matrix.dockerDistro }}
--target=ArtifactsTest --arch=${{ inputs.arch }} --dotnet_version=${{ matrix.dotnet_version }} `
--docker_distro=${{ matrix.docker_distro }}
18 changes: 9 additions & 9 deletions .github/workflows/_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
arch:
required: true
type: string
dockerDistros:
docker_distros:
required: true
type: string
dotnetVersions:
dotnet_versions:
required: true
type: string
env:
Expand All @@ -19,13 +19,13 @@ env:

jobs:
docker:
name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }}
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
runs-on: ${{ inputs.runner }}
strategy:
fail-fast: false
matrix:
dockerDistro: ${{ fromJson(inputs.dockerDistros) }}
dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }}
docker_distro: ${{ fromJson(inputs.docker_distros) }}
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
steps:
-
name: Checkout
Expand All @@ -50,16 +50,16 @@ jobs:
uses: ./.github/actions/docker-test
with:
arch: ${{ inputs.arch }}
dockerDistro: ${{ matrix.dockerDistro }}
dotnetVersion: ${{ matrix.dotnetVersion }}
docker_distro: ${{ matrix.docker_distro }}
dotnet_version: ${{ matrix.dotnet_version }}
-
name: Docker Publish
if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools' && github.ref_name == 'main'
uses: ./.github/actions/docker-publish
with:
arch: ${{ inputs.arch }}
dockerDistro: ${{ matrix.dockerDistro }}
dotnetVersion: ${{ matrix.dotnetVersion }}
docker_distro: ${{ matrix.docker_distro }}
dotnet_version: ${{ matrix.dotnet_version }}
docker_registry_username: ${{ secrets.DOCKER_USERNAME }}
docker_registry_password: ${{ secrets.DOCKER_PASSWORD }}
github_registry_username: ${{ github.repository_owner }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/_docker_manifests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
on:
workflow_call:
inputs:
dockerDistros:
docker_distros:
required: true
type: string
dotnetVersions:
dotnet_versions:
required: true
type: string
env:
Expand All @@ -13,13 +13,13 @@ env:

jobs:
manifest:
name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }}
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
dockerDistro: ${{ fromJson(inputs.dockerDistros) }}
dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }}
docker_distro: ${{ fromJson(inputs.docker_distros) }}
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
steps:
-
name: Checkout
Expand All @@ -37,8 +37,8 @@ jobs:
if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools' && github.ref_name == 'main'
uses: ./.github/actions/docker-manifests
with:
dockerDistro: ${{ matrix.dockerDistro }}
dotnetVersion: ${{ matrix.dotnetVersion }}
docker_distro: ${{ matrix.docker_distro }}
dotnet_version: ${{ matrix.dotnet_version }}
docker_registry_username: ${{ secrets.DOCKER_USERNAME }}
docker_registry_password: ${{ secrets.DOCKER_PASSWORD }}
github_registry_username: ${{ github.repository_owner }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/_prepare.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
on:
workflow_call:
outputs:
dockerDistros:
docker_distros:
description: 'List of Docker distros'
value: ${{ jobs.set_matrix.outputs.dockerDistros }}
dotnetVersions:
value: ${{ jobs.set_matrix.outputs.docker_distros }}
dotnet_versions:
description: 'List of .NET versions'
value: ${{ jobs.set_matrix.outputs.dotnetVersions }}
value: ${{ jobs.set_matrix.outputs.dotnet_versions }}
jobs:
prepare:
name: ${{ matrix.os }}
Expand Down Expand Up @@ -51,8 +51,8 @@ jobs:
name: Set Matrix
runs-on: ubuntu-24.04
outputs:
dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }}
dotnetVersions: ${{ steps.set_matrix.outputs.dotnetVersions }}
docker_distros: ${{ steps.set_matrix.outputs.docker_distros }}
dotnet_versions: ${{ steps.set_matrix.outputs.dotnet_versions }}
steps:
-
name: Checkout
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
workflow_call:
inputs:
dotnetVersions:
dotnet_versions:
required: true
type: string
env:
Expand All @@ -10,14 +10,14 @@ env:

jobs:
unit_test:
name: ${{ matrix.os }} - net${{ matrix.dotnetVersion }}
name: ${{ matrix.os }} - net${{ matrix.dotnet_version }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
fail-fast: false
matrix:
os: [windows-2025, ubuntu-24.04, macos-15]
dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }}
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -32,11 +32,11 @@ jobs:
-
name: '[Unit Test]'
shell: pwsh
run: dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnetVersion }}
run: dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }}

-
name: Test Summary
uses: test-summary/[email protected]
if: matrix.dotnetVersion == '9.0'
if: matrix.dotnet_version == '9.0'
with:
paths: artifacts/test-results/*.results.xml
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
needs: [ prepare ]
uses: ./.github/workflows/_unit_tests.yml
with:
dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }}
dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }}
secrets: inherit

artifacts_windows_test:
Expand All @@ -77,8 +77,8 @@ jobs:
with:
runner: ${{ matrix.runner }}
arch: ${{ matrix.arch }}
dockerDistros: ${{ needs.prepare.outputs.dockerDistros }}
dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }}
docker_distros: ${{ needs.prepare.outputs.docker_distros }}
dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }}

docker_linux_images:
needs: [ prepare, build ]
Expand All @@ -96,17 +96,17 @@ jobs:
with:
runner: ${{ matrix.runner }}
arch: ${{ matrix.arch }}
dockerDistros: ${{ needs.prepare.outputs.dockerDistros }}
dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }}
docker_distros: ${{ needs.prepare.outputs.docker_distros }}
dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }}
secrets: inherit

docker_linux_manifests:
needs: [ prepare, docker_linux_images ]
name: Docker Manifests
uses: ./.github/workflows/_docker_manifests.yml
with:
dockerDistros: ${{ needs.prepare.outputs.dockerDistros }}
dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }}
docker_distros: ${{ needs.prepare.outputs.docker_distros }}
dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }}
secrets: inherit

publish:
Expand Down
4 changes: 2 additions & 2 deletions build/config/Tasks/SetMatrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public override void Run(BuildContext context)
{
if (context.BuildSystem().IsRunningOnGitHubActions)
{
context.GitHubActions().Commands.SetOutputParameter("dockerDistros", context.SerializeJson(Constants.DockerDistros));
context.GitHubActions().Commands.SetOutputParameter("dotnetVersions", context.SerializeJson(Constants.DotnetVersions));
context.GitHubActions().Commands.SetOutputParameter("docker_distros", context.SerializeJson(Constants.DockerDistros));
context.GitHubActions().Commands.SetOutputParameter("dotnet_versions", context.SerializeJson(Constants.DotnetVersions));
}
else
{
Expand Down

0 comments on commit 8b7bbdc

Please sign in to comment.