Skip to content
search

GitHub Action

Search Docker Tag

v1 Latest version

Search Docker Tag

search

Search Docker Tag

Search for last docker tag matching given pattern

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Search Docker Tag

uses: sylvanld/action-search-docker-tag@v1

Learn more about this action in sylvanld/action-search-docker-tag

Choose a version

Search Docker tag action

Search for last docker tag matching given pattern.

Inputs

image

Required Full name of the image (as in: example/image, library/redis)

search

Optional A python regex pattern that searched tag must match.

Defaults to .+ meaning "match any version".

Outputs

tag

The latest tag matching your search.

Example usage

jobs:
  example_job:
    ...
    steps:
      - name: "Get latest redis tag"
        id: get-redis-tag
        uses: sylvanld/action-search-docker-tag@v1
        with:
          image: 'library/redis'
          search: '\d+\.\d+\.\d+'

      - name: "Get the output time"
        run: echo "Redis latest version -> ${{ steps.get-redis-tag.outputs.tag }}"