Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
kostis-codefresh/newest-dockerhub-tag kostis-codefresh/newest-dockerhub-tag
Finds the newest tag of a dockerhub image according to semantic versioning.
arguments
returns
version: '1.0'
steps:
find_newest_dockerhub_tag:
title: Finding newest tag of Ubuntu
type: kostis-codefresh/newest-dockerhub-tag
arguments:
BASE_IMAGE: ubuntu
print_tag:
title: Printing newest tag
image: alpine
commands:
- echo $NEWEST_TAG
- 'echo ${{steps.find_newest_dockerhub_tag.output.NEWEST_TAG}}'