https://github.com/sapvs/docker-image-id
Image id action to retrieve image ID of a docker image
https://github.com/sapvs/docker-image-id
docker docker-image github-action github-actions
Last synced: about 2 months ago
JSON representation
Image id action to retrieve image ID of a docker image
- Host: GitHub
- URL: https://github.com/sapvs/docker-image-id
- Owner: sapvs
- License: mit
- Created: 2022-09-15T11:39:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-22T12:27:14.000Z (almost 4 years ago)
- Last Synced: 2026-03-28T09:25:59.409Z (3 months ago)
- Topics: docker, docker-image, github-action, github-actions
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker image ID
A Github action to retrieve the image id for an image name.
This is useful if you want to check if images have been updated (comparing new vs old id). Mostly in case of images that are being used as base image in your image and you would like to re-create your image if the base image has changed.
## Usage
```yml
- name: Image ID
id: image-id
uses: s3vt/docker-image-id@v1.0.0
with:
image_name: "s3vt/java:18"
```
This can be used in sample projects as
```yml
on:
push:
jobs:
image-query:
runs-on: ubuntu-latest
name: Get Image ID
steps:
- name: Image ID
id: image-id
uses: s3vt/docker-image-id@v1.0.0
with:
image_name: "s3vt/java:17"
- name: Print the image ID
run: echo "Image ID is ${{ steps.image-id.outputs.image_id }}"
```
### Action inputs
| Name | Description | Default |
| --- | --- | --- |
| `image_name` | (**required**) Name of the image for which ID is to be retrieved.. | alpine:latest |
### Action output
| Name | Description |
| --- | --- |
| `image_id` | ID of the image requested. |