edh-elo/.drone.yml
2024-07-01 22:59:55 -07:00

46 lines
1.3 KiB
YAML

kind: pipeline
name: build-and-deploy
type: docker
platform:
os: linux
arch: arm64
steps:
- name: docker-build-and-push
image: thegeeklab/drone-docker-buildx # Absurd that this isn't offered as first-party!
privileged: true
settings:
cache_from:
- "type=registry\\\\,ref=gitea.scubbo.org/${DRONE_REPO}:${DRONE_BRANCH}"
cache_to:
# https://docs.docker.com/build/cache/backends/registry/
# `mode=max` necessary in order to cache intermediate stages
- "type=registry,ref=gitea.scubbo.org/${DRONE_REPO}:${DRONE_BRANCH},mode=max"
registry: gitea.scubbo.org
username: scubbo
password:
from_secret: gitea_password
repo: gitea.scubbo.org/${DRONE_REPO}
tags:
- ${DRONE_BRANCH}
- ${DRONE_COMMIT_SHA:0:10}
target: prod
platforms:
- linux/arm64
- linux/amd64
- 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:
- apk add yq git
- cd helm-charts
- yq -i '.image.tag = "${DRONE_COMMIT_SHA:0:10}"' charts/edh-elo/values.yaml
- git add -A
- git commit -m "Update EDH ELO commit to "${DRONE_COMMIT_SHA:0:10}"
- git push