Skip to content

Commit adec8b4

Browse files
authored
Add steps to fetch and extract OCI image tarball (#4552)
Added steps to fetch and extract OCI image tarball. Signed-off-by: Maksim Nabokikh <maksim.nabokikh@flant.com>
1 parent eb9f04b commit adec8b4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/artifacts.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,22 @@ jobs:
142142
id: image-ref
143143
run: echo "value=${{ steps.image-name.outputs.value }}@${{ steps.build.outputs.digest }}" >> "$GITHUB_OUTPUT"
144144

145+
- name: Fetch image
146+
run: skopeo --insecure-policy copy docker://${{ steps.image-ref.outputs.value }} oci-archive:image.tar
147+
if: inputs.publish
148+
145149
# Uncomment the following lines for debugging:
146150
# - name: Upload image as artifact
147151
# uses: actions/upload-artifact@v3
148152
# with:
149153
# name: "[${{ github.job }}] OCI tarball"
150154
# path: image.tar
151-
#
155+
156+
- name: Extract OCI tarball
157+
run: |
158+
mkdir -p image
159+
tar -xf image.tar -C image
160+
152161
# - name: List tags
153162
# run: skopeo --insecure-policy list-tags oci:image
154163
#

0 commit comments

Comments
 (0)