automated docker releases!

This commit is contained in:
Mike Farah 2020-12-22 16:16:31 +11:00
parent 4dbf158505
commit f059e13f94
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,5 @@
name: Publish image to Dockerhub
on:
push: # temporary
release:
types: [released]
@ -44,6 +43,6 @@ jobs:
PLATFORMS="linux/amd64,linux/ppc64le,linux/arm64"
echo "Building and pushing version ${IMAGE_VERSION} of image ${IMAGE_NAME}"
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker buildx build --platform "${PLATFORMS}" -t "${IMAGE_NAME}:${IMAGE_VERSION}-buildx" -t "${IMAGE_NAME}:buildx" \
docker buildx build --platform "${PLATFORMS}" -t "${IMAGE_NAME}:${IMAGE_VERSION}" -t "${IMAGE_NAME}:latest" -t "${IMAGE_NAME}:4" \
--push .

View File

@ -6,6 +6,7 @@ docker build \
--build-arg VERSION=${VERSION} \
-t mikefarah/yq:latest \
-t mikefarah/yq:${VERSION} \
-t mikefarah/yq:4 \
.
trivy image mikefarah/yq:${VERSION}