Closed LeviPesin closed 1 year ago
It works fine on my side:
name: oci
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
outputs: type=oci,dest=/tmp/build.tar
tags: |
name/app:latest
name/app:1.0.0
-
name: Load
run: docker load -i /tmp/build.tar
Can you share a full repro please?
It doesn't work in different jobs -- i.e. when using upload-artifact and download-artifact to share the tarball with image.
Yep, the three main options:
IIRC this actions supports cache and registry, which I like more than artifacts either way. Cache and registry are basically equivalent, though I've noticed more GHCR errors using GitHub Actions and I've been on the fence about switching to the cache to avoid flakiness.
I think I will use cache instead of the artifacts then, thank you!
Is there any way to share an image built with
type=oci
(so that it can contain provenance, for example) between jobs? Usingdocker load
results in an error likeopen /var/lib/docker/tmp/docker-import-2995601243/blobs/json: no such file or directory
-- it seems it works only withtype=docker
?