https://github.com/flownative/action-docker-get-label
Github action which inspects a given Docker image and returns the value of a specified label
https://github.com/flownative/action-docker-get-label
build-automation docker github-action
Last synced: about 2 months ago
JSON representation
Github action which inspects a given Docker image and returns the value of a specified label
- Host: GitHub
- URL: https://github.com/flownative/action-docker-get-label
- Owner: flownative
- License: mit
- Created: 2020-03-24T06:33:06.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-22T19:07:02.000Z (about 2 years ago)
- Last Synced: 2025-03-20T00:06:09.375Z (3 months ago)
- Topics: build-automation, docker, github-action
- Language: Shell
- Size: 9.77 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# "Get Docker Image Label" Github Action
This Github action inspects a given Docker image and returns the value
of a specified label.Consider a Docker image tagged as "flownative/php:7.4". This image
contains a label "org.label-schema.version" in its metadata which tells
the full PHP version number "7.4.4". Using this action, you can retrieve
this version number for further processing in your workflow.## Example workflow
````yaml
# …
jobs:
build:
runs-on: ubuntu-latest
steps:
# …
- name: Determine latest version
id: latest_php_version
uses: flownative/action-docker-get-label@v1
with:
image: flownative/php:7.4
label: org.label-schema.version
registry_username: github
registry_password: ${{ secrets.GITHUB_BOT_TOKEN }}
registry_endpoint: https://docker.pkg.github.com/v2/- name: Build Docker image
uses: flownative/action-docker-build@v1
env:
PHP_VERSION: ${{ steps.latest_php_version.outputs.value }}
with:
# …
````