From b5ab11451499c38b999ee61a3c81d5928ffe8eee Mon Sep 17 00:00:00 2001 From: deadprogram Date: Sun, 2 Aug 2020 17:29:52 +0200 Subject: [PATCH] dockerhub: use post checkout hook for git submodule init Signed-off-by: deadprogram --- hooks/README.md | 5 +++++ hooks/post_checkout | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 hooks/README.md create mode 100755 hooks/post_checkout diff --git a/hooks/README.md b/hooks/README.md new file mode 100644 index 00000000..493e861d --- /dev/null +++ b/hooks/README.md @@ -0,0 +1,5 @@ +# Hooks for Docker Hub + +Files in this directory are custom commands to be run during the different Docker Hub build phases. + +See https://docs.docker.com/docker-hub/builds/advanced/#custom-build-phase-hooks diff --git a/hooks/post_checkout b/hooks/post_checkout new file mode 100755 index 00000000..1c6f495c --- /dev/null +++ b/hooks/post_checkout @@ -0,0 +1,4 @@ +#!/bin/bash +# Docker hub does a recursive clone, then checks the branch out, +# so when a PR adds a submodule (or updates it), it fails. +git submodule update --init