78
78
79
79
- name : Set up Cosign
80
80
uses : sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
81
- if : inputs.publish
81
+ if : ${{ inputs.publish }}
82
82
83
83
- name : Set image name
84
84
id : image-name
@@ -102,37 +102,28 @@ jobs:
102
102
org.opencontainers.image.authors=Kube logging authors
103
103
org.opencontainers.image.documentation=https://kube-logging.dev/docs/
104
104
105
- # Multiple exporters are not supported yet
106
- # See https://github.com/moby/buildkit/pull/2760
107
- - name : Determine build output
108
- uses : haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
109
- id : build-output
110
- with :
111
- cond : ${{ inputs.publish }}
112
- if_true : type=image,push=true
113
- if_false : type=oci,dest=image.tar
114
-
115
105
- name : Login to GitHub Container Registry
116
106
uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
117
107
with :
118
108
registry : ghcr.io
119
109
username : ${{ github.actor }}
120
110
password : ${{ github.token }}
121
- if : inputs.publish
111
+ if : ${{ inputs.publish }}
122
112
123
113
- name : Build and push image
124
114
id : build
125
115
uses : docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
126
116
with :
127
117
context : .
128
- platforms : linux/amd64,linux/arm64,linux/arm/v7
118
+ platforms : linux/amd64,linux/arm64
129
119
tags : ${{ steps.meta.outputs.tags }}
130
120
labels : ${{ steps.meta.outputs.labels }}
131
121
cache-from : type=gha
132
122
cache-to : type=gha,mode=max
133
123
build-args : GO_BUILD_FLAGS=-ldflags=-X=github.com/kube-logging/logging-operator/pkg/sdk/logging/api/v1beta1.Version=${{ inputs.version }}
134
- outputs : ${{ steps.build-output.outputs.value }},name=target,annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.description'] }}
135
- # push: ${{ inputs.publish }}
124
+ outputs : |
125
+ type=image,push=${{ inputs.publish }},name=target,annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.description'] }}
126
+ type=oci,dest=image.tar,name=target,annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.description'] }}
136
127
137
128
- name : Sign image with GitHub OIDC Token
138
129
if : ${{ inputs.publish && github.repository_owner == 'kube-logging' }} # Check if the workflow is called by the same GitHub organization
@@ -199,10 +190,6 @@ jobs:
199
190
fi
200
191
fi
201
192
202
- - name : Fetch image
203
- run : skopeo --insecure-policy copy docker://${{ steps.image-name.outputs.value }}:${{ steps.meta.outputs.version }} oci-archive:image.tar
204
- if : inputs.publish
205
-
206
193
- name : Extract OCI tarball
207
194
run : |
208
195
mkdir -p image
0 commit comments