GitHub Action
Container Image Artifact Download
Github action for downloading a container image artifact. It downloads image artifact uploaded by container-image-artifact-upload and loads into local container engine for use in a job.
It supports downloading image artifacts from
- same job
- different job in the same workflow
- different job in a different workflow in the same repository
- different job in a different workflow in a different repository
Required Image name that is to be downloaded.
Optional Container engine to use load downloaded image into. Supports docker
, podman
. Defaults to docker
.
Optional Repository in form of owner/name to download image from.
Optional Workflow name to download image from.
Optional Token with enough permissions to download artifact(s) from repo and workflow. It is required if workflow
is set to different workflow than the currently running.
Optional Filter workflow runs based workflow event. This takes the precedence over all filters if it is set.
Optional Filter workflow runs based on workflow conclusion. Possible values are success
, failure
, cancelled
, or skipped
.
Optional Filter workflow runs based on commit SHA.
Optional Filter workflow runs based on branch.
Optional Filter workflow runs based workflow event.
Path in node where container image archive is downloaded. Eg. /tmp/foo_latest
for image foo:latest
.
...
jobs:
download_image:
- name: Checkout project
uses: actions/checkout@v2
- name: Download image
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "test_image:latest"
...
jobs:
download_image:
- name: Checkout project
uses: actions/checkout@v2
- name: Download image
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "test_image:latest"
container_engine: "podman"
...
jobs:
download_image:
- name: Checkout project
uses: actions/checkout@v2
- name: Download image
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "test_image:latest"
workflow: "Some Another Workflow"
token: "secrettoken"
...
jobs:
download_image:
- name: Checkout project
uses: actions/checkout@v2
- name: Download image
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "test_image:latest"
workflow: "Some Another Workflow"
token: "secrettoken"
workflow_run_id: "234343434234234"
...
jobs:
download_image:
- name: Checkout project
uses: actions/checkout@v2
- name: Download image
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "test_image:latest"
workflow: "Some Another Workflow"
token: "secrettoken"
workflow_event: "dispatch_workflow"
branch: "main"
commit_sha: "8471d40bfc4d0abc8409ba9391bb592bd0f1deb4"
workflow_conclusion: "success"
...
jobs:
download_image:
- name: Checkout project
uses: actions/checkout@v2
- name: Download image
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "test_image:latest"
repository: "owner/my-repo"
workflow: "Some Another Workflow"
token: "secrettoken"
- Use v4 of @actions/download-artifact
- Update other dependencies
Migration:
- Compatiable with only >=v2.0.0 for ishworkh/container-image-artifact-upload
- Fix README
- Update for nodejs 20
- First release
This library is under the MIT license.