filter yq to just first document
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
parent
1bef7678d5
commit
e9a8b0ee3a
@ -91,7 +91,7 @@ steps:
|
|||||||
- LATEST_VERSION=$(git tag --sort v:refname | grep '^v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}$' | tail -n 1)
|
- LATEST_VERSION=$(git tag --sort v:refname | grep '^v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}$' | tail -n 1)
|
||||||
- git checkout $LATEST_VERSION
|
- git checkout $LATEST_VERSION
|
||||||
- printf $(git log -n 1 --pretty=%H) > ../commit_hash # we'll need this for the docker build
|
- printf $(git log -n 1 --pretty=%H) > ../commit_hash # we'll need this for the docker build
|
||||||
- GOLANG_IMG=$(yq eval '.steps[0].image' .drone.yml)
|
- GOLANG_IMG=$(yq eval 'select(documentIndex == 0) | .steps[0].image' .drone.yml)
|
||||||
- docker pull $GOLANG_IMG
|
- docker pull $GOLANG_IMG
|
||||||
- docker tag $GOLANG_IMG drone-builder:latest
|
- docker tag $GOLANG_IMG drone-builder:latest
|
||||||
- docker image rm $GOLANG_IMG
|
- docker image rm $GOLANG_IMG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user