diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 9af2ea4..0ee92b2 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -14,7 +14,7 @@ jobs: test-nogitdiff: runs-on: ubuntu-latest container: - image: mcr.microsoft.com/powershell:7.2.2-alpine-3.14-20220318 + image: mcr.microsoft.com/powershell:lts-7.2-alpine-3.17 steps: - run: | apk add --no-cache git diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 5d409e9..1ed2a74 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -11,10 +11,7 @@ "-c", "Generate-DockerImageVariants ." ], - "group": { - "kind": "build", - "isDefault": true - } + "group": "build" }, { "label": "Install DockerImageVariants module", diff --git a/generate/definitions/VARIANTS.ps1 b/generate/definitions/VARIANTS.ps1 index 3d2f18e..ca27cb5 100644 --- a/generate/definitions/VARIANTS.ps1 +++ b/generate/definitions/VARIANTS.ps1 @@ -130,6 +130,7 @@ $VARIANTS = @( } } components = $subVariant['components'] + job_group_key = $variant['package_version'] } # Docker image tag. E.g. 'v2.3.0-alpine-3.6' tag = @( diff --git a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 index c73c08f..9be7359 100644 --- a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 +++ b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 @@ -15,7 +15,7 @@ jobs: test-nogitdiff: runs-on: ubuntu-latest container: - image: mcr.microsoft.com/powershell:7.2.2-alpine-3.14-20220318 + image: mcr.microsoft.com/powershell:lts-7.2-alpine-3.17 steps: - run: | apk add --no-cache git @@ -36,7 +36,7 @@ jobs: '@ # Group variants by the package version -$groups = $VARIANTS | Group-Object -Property { $_['_metadata']['package_version'] } | Sort-Object -Property { [version]$_.Name } -Descending +$groups = $VARIANTS | Group-Object -Property { $_['_metadata']['job_group_key'] } | Sort-Object { [version]$_.Name.Split('-')[0] } -Descending $WORKFLOW_JOB_NAMES = $groups | % { "build-$( $_.Name.Replace('.', '-') )" } foreach ($g in $groups) { @"