Skip to content

Commit e8f6d23

Browse files
committed
Revert "chore: try add actions/cache for windows container"
This reverts commit 741f375.
1 parent 741f375 commit e8f6d23

1 file changed

Lines changed: 22 additions & 17 deletions

File tree

.github/workflows/release_docker_win.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ jobs:
4242
steps:
4343
- name: Checkout
4444
uses: actions/checkout@v4
45-
46-
- name: Set up Docker
47-
uses: docker/setup-docker-action@v4
48-
49-
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@v3
5145

5246
- name: Login to GitHub Container Registry
5347
if: env.IMAGE_PUSH == 'true'
@@ -104,14 +98,25 @@ jobs:
10498
Write-Host "Tags: $tagsString"
10599
106100
- name: Build and push Windows container
107-
uses: docker/build-push-action@v6
108-
with:
109-
context: .
110-
file: Dockerfile.windows
111-
build-args: |
112-
WINDOWS_VERSION=${{ steps.tag.outputs.windows_version }}
113-
WINDOWS_TYPE=${{ matrix.container_type }}
114-
push: ${{ env.IMAGE_PUSH }}
115-
tags: ${{ steps.meta.outputs.tags }}
116-
cache-from: type=gha
117-
cache-to: type=gha,mode=max
101+
shell: pwsh
102+
run: |
103+
$tags = "${{ steps.meta.outputs.tags }}".Split(",")
104+
$tagArgs = @()
105+
foreach ($tag in $tags) {
106+
$tagArgs += "-t"
107+
$tagArgs += $tag.Trim()
108+
}
109+
110+
docker build `
111+
--build-arg WINDOWS_VERSION=${{ steps.tag.outputs.windows_version }} `
112+
--build-arg WINDOWS_TYPE=${{ matrix.container_type }} `
113+
-f Dockerfile.windows `
114+
$tagArgs `
115+
.
116+
117+
if ("${{ env.IMAGE_PUSH }}" -eq "true") {
118+
foreach ($tag in $tags) {
119+
Write-Host "Pushing $($tag.Trim())"
120+
docker push $tag.Trim()
121+
}
122+
}

0 commit comments

Comments
 (0)