File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments