Skip to content

Commit 8f3e14e

Browse files
committed
CICD
1 parent a9cef69 commit 8f3e14e

1 file changed

Lines changed: 27 additions & 25 deletions

File tree

.github/workflows/artifacts.yaml

Lines changed: 27 additions & 25 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,13 +94,13 @@ 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
@@ -108,12 +110,12 @@ jobs:
108110
password: ${{ github.token }}
109111
if: inputs.publish
110112

111-
- name: Login to Docker Hub
112-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
113-
with:
114-
username: ${{ secrets.DOCKER_USERNAME }}
115-
password: ${{ secrets.DOCKER_PASSWORD }}
116-
if: inputs.publish
113+
# - name: Login to Docker Hub
114+
# uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
115+
# with:
116+
# username: ${{ secrets.DOCKER_USERNAME }}
117+
# password: ${{ secrets.DOCKER_PASSWORD }}
118+
# if: inputs.publish
117119

118120
- name: Build and push image
119121
id: build
@@ -130,7 +132,7 @@ jobs:
130132
labels: ${{ steps.meta.outputs.labels }}
131133
# cache-from: type=gha
132134
# cache-to: type=gha,mode=max
133-
outputs: ${{ steps.build-output.outputs.value }}
135+
outputs: type=image,push=true
134136
# push: ${{ inputs.publish }}
135137

136138
- name: Sign the images with GitHub OIDC Token
@@ -153,10 +155,10 @@ jobs:
153155
# name: "[${{ github.job }}] OCI tarball"
154156
# path: image.tar
155157

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

161163
# - name: List tags
162164
# run: skopeo --insecure-policy list-tags oci:image
@@ -183,13 +185,13 @@ jobs:
183185
# subject-digest: ${{ steps.build.outputs.digest }}
184186
# push-to-registry: true
185187

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
188+
# - name: Generate build provenance attestation
189+
# uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
190+
# with:
191+
# subject-name: ghcr.io/${{ github.repository }}
192+
# subject-digest: ${{ steps.build.outputs.digest }}
193+
# push-to-registry: true
194+
# if: inputs.publish
193195

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

0 commit comments

Comments
 (0)