New approach - git clone directly

This commit is contained in:
Jack Jackson 2024-07-08 23:24:41 -07:00
parent c2541afff6
commit 8d0acf7081

View File

@ -39,31 +39,17 @@ 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:
- find . -not -path '.'
- find . -not -path '.' | xargs rm -rf
# Log out to check
- find . -not -path '.'
- 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:
- ls
- find
# Cannot use `drone/git` plugin because:
# * it cannot check out to a different directory
# * if you try to clear the main directory and use it to checkout, Drone will just re-clone the original repo
# between steps
# ...God, I really need to transition off of Drone and onto a better CI tool...
- apk add yq git
- git clone gitea.scubbo.org/scubbo/helm-charts
- cd helm-charts
- yq -i '.image.tag = "${DRONE_COMMIT_SHA:0:10}"' charts/edh-elo/values.yaml
- git add -A