Skip to content

About

Github action which inspects a given Docker image and returns the value of a specified label

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"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

# …
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:
# …        

About

Github action which inspects a given Docker image and returns the value of a specified label

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages