Module providing functionalities for uploading and downloading container image(s) in github action workflows. It leverages github artifact in the background to store uploaded images.
Images can be uploaded and downloaded with multiple container engines, and currently supported container engines are docker
and podman
.
Following functions are exported from the module,
Gives image uploader function which can be used to upload image as a github artifact to the current workflow run.
const artifactUploader = createArtifactUploader();
// "docker" as container engine
getUploader(artifactUploader)(image, retentionDays = 0);
// "podman" as container engine
getUploader(artifactUploader, "podman")(image, retentionDays = 0);
Gives image downloader function which can be used to download images.
const artifactDownloader = createArtifactDownloader();
// "docker" as container engine
getDownloader(artifactDownloader)(image);
// "podman" as container engine
getDownloader(artifactDownloader, "podman")(image);
Function that creates core action artifact uploader. This uploader uses @actions/artifact
module underneath.
const uploader = createArtifactUploader();
Function that creates core action artifact downloader. This downloader uses @actions/artifact
module underneath and is capable of downloading artifacts from the same workflow.
const downloader = createArtifactDownloader();
Function that creates octokit artifact downloader. This downloader uses octokit
module underneath. This downloader is capable of downloading artifacts from another workflow.
const downloader = createOctokitArtifactDownloader(
"github_token", "foo_owner", "bar_repo", "Test workflow", (workflowRun) => workflowRun.id == 12434344
);