Skip to content

Commit ba54685

Browse files
committed
fix: simplify further
1 parent cada354 commit ba54685

1 file changed

Lines changed: 4 additions & 22 deletions

File tree

.github/workflows/build-and-publish.yaml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,16 @@ jobs:
3232
username: ${{ github.repository_owner }}
3333
password: ${{ secrets.GITHUB_TOKEN }}
3434

35-
- name: Extract metadata (tags, labels) for Docker
36-
id: meta
37-
uses: docker/metadata-action@v5
38-
with:
39-
images: ghcr.io/${{ github.repository }}
40-
tags: |
41-
type=raw,value=latest
42-
type=ref,event=branch
43-
type=sha
44-
4535
- name: Build and push Docker image
4636
id: push
4737
shell: pwsh
4838
run: |
49-
$rawTags = "${{ steps.meta.outputs.tags }}".Trim()
50-
$rawLabels = "${{ steps.meta.outputs.labels }}".Trim()
51-
$tags = $rawTags -split "`n" | Where-Object { $_ -ne "" }
52-
if ($tags.Count -eq 0) { throw "No tags" }
53-
54-
$tagArgs = $tags | ForEach-Object { "-t", $_ } | ForEach-Object { $_ }
55-
5639
docker build `
5740
--build-arg WINDOWS_VERSION=ltsc2022 `
5841
--build-arg VECTOR_VERSION=0.51.0 `
59-
--label "$rawLabels" `
60-
$tagArgs `
42+
-t ghcr.io/${{ github.repository_owner }}/vector-windows-container-image:latest `
43+
-t ghcr.io/${{ github.repository_owner }}/vector-windows-container-image:v0.51.0 `
6144
.
6245
63-
foreach ($tag in $tags) {
64-
docker push $tag
65-
}
46+
docker push ghcr.io/${{ github.repository_owner }}/vector-windows-container-image:latest
47+
docker push ghcr.io/${{ github.repository_owner }}/vector-windows-container-image:v0.51.0

0 commit comments

Comments
 (0)