Skip to content

Commit 3dc67b2

Browse files
committed
CICD
1 parent a9cef69 commit 3dc67b2

1 file changed

Lines changed: 21 additions & 20 deletions

File tree

.github/workflows/artifacts.yaml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Artifacts
22

33
on:
4+
push:
5+
branches: [ main ]
46
workflow_call:
57
inputs:
68
publish:
@@ -92,21 +94,20 @@ jobs:
9294
9395
# Multiple exporters are not supported yet
9496
# See https://github.com/moby/buildkit/pull/2760
95-
- name: Determine build output
96-
uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
97-
id: build-output
98-
with:
99-
cond: ${{ inputs.publish }}
100-
if_true: type=image,push=true
101-
if_false: type=oci,dest=image.tar
97+
# - name: Determine build output
98+
# uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
99+
# id: build-output
100+
# with:
101+
# cond: ${{ inputs.publish }}
102+
# if_true: type=image,push=true
103+
# if_false: type=oci,dest=image.tar
102104

103105
- name: Login to GitHub Container Registry
104106
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
105107
with:
106108
registry: ghcr.io
107109
username: ${{ github.actor }}
108110
password: ${{ github.token }}
109-
if: inputs.publish
110111

111112
- name: Login to Docker Hub
112113
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
@@ -130,7 +131,7 @@ jobs:
130131
labels: ${{ steps.meta.outputs.labels }}
131132
# cache-from: type=gha
132133
# cache-to: type=gha,mode=max
133-
outputs: ${{ steps.build-output.outputs.value }}
134+
outputs: type=image,push=true
134135
# push: ${{ inputs.publish }}
135136

136137
- name: Sign the images with GitHub OIDC Token
@@ -153,10 +154,10 @@ jobs:
153154
# name: "[${{ github.job }}] OCI tarball"
154155
# path: image.tar
155156

156-
- name: Extract OCI tarball
157-
run: |
158-
mkdir -p image
159-
tar -xf image.tar -C image
157+
# - name: Extract OCI tarball
158+
# run: |
159+
# mkdir -p image
160+
# tar -xf image.tar -C image
160161

161162
# - name: List tags
162163
# run: skopeo --insecure-policy list-tags oci:image
@@ -183,13 +184,13 @@ jobs:
183184
# subject-digest: ${{ steps.build.outputs.digest }}
184185
# push-to-registry: true
185186

186-
- name: Generate build provenance attestation
187-
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
188-
with:
189-
subject-name: ghcr.io/${{ github.repository }}
190-
subject-digest: ${{ steps.build.outputs.digest }}
191-
push-to-registry: true
192-
if: inputs.publish
187+
# - name: Generate build provenance attestation
188+
# uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
189+
# with:
190+
# subject-name: ghcr.io/${{ github.repository }}
191+
# subject-digest: ${{ steps.build.outputs.digest }}
192+
# push-to-registry: true
193+
# if: inputs.publish
193194

194195
## Use cache for the trivy-db to avoid the TOOMANYREQUESTS error https://github.com/aquasecurity/trivy-action/pull/397
195196
## To avoid the trivy-db becoming outdated, we save the cache for one day

0 commit comments

Comments
 (0)