From e31aa8ab34a45a8252f551b7132a1ea79a548a56 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Mon, 8 Jul 2024 22:23:23 -0700 Subject: [PATCH] Update .drone.yml to enable clearing originally-checked-out dir --- .drone.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.drone.yml b/.drone.yml index 4a34340..0417985 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,6 +23,9 @@ steps: # # https://github.com/go-gitea/gitea/issues/28973#issuecomment-1961859655 # Some parameters are necessary in order to make the push to gitea succeed + # + # Another reference: + # https://github.com/thegeeklab/drone-docker-buildx/issues/47 - "type=registry,ref=gitea.scubbo.org/${DRONE_REPO}:${DRONE_BRANCH},mode=max,image-manifest=true,oci-mediatypes=true" registry: gitea.scubbo.org username: scubbo @@ -36,11 +39,24 @@ steps: platforms: - linux/arm64 - linux/amd64 + # Because `drone/git` does not support checking out to a specified directory + # (https://github.com/drone/drone-git/blob/master/posix/clone-commit), we have to remove the current contents of the + # directory before cloning the Helm Chart repo or there will be a clash. + # + # ...God, I really need to transition off of Drone and onto a better CI tool... + - name: Clear directory + image: alpine + commands: + - rm -rf * + # Shouldn't need to specify this, but just in case + - rm -rf .git + - name: Checkout Helm Chart image: drone/git settings: remote: gitea.scubbo.org/scubbo/helm-charts ref: refs/heads/main + - name: Update Helm Chart image: alpine commands: