From 6f126515fea60f80d9452b96b9ccc4101b80df45 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Thu, 20 Jun 2024 23:35:05 +0200 Subject: [PATCH] rework build --- .drone.yml | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index a74dc7e..0438e81 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,6 +13,29 @@ steps: tags: - latest - ${DRONE_BUILD_NUMBER} + when: + branch: + - main + event: + - push +- name: docker-build + image: plugins/docker + settings: + username: + from_secret: DOCKER_USERNAME + password: + from_secret: DOCKER_PASSWORD + repo: aaronriedel/egress-test + tags: + - latest + - ${DRONE_BUILD_NUMBER} + dry_run: true + when: + branch: + exclude: + - main + event: + - push - name: bump tag in deployment-repo image: git.ar21.de/aaron/kustomize-ci commands: @@ -23,6 +46,12 @@ steps: volumes: - name: deployment-repo path: /deployment-repo + settings: + when: + branch: + - main + event: + - push - name: push new tag to deployment-repo image: appleboy/drone-git-push settings: @@ -34,16 +63,14 @@ steps: commit_message: "update image tag to ${DRONE_BUILD_NUMBER}" ssh_key: from_secret: GITEA_SSH_KEY + when: + branch: + - main + event: + - push volumes: - name: deployment-repo path: /deployment-repo volumes: - name: deployment-repo temp: {} -when: - branch: - include: - - main - event: - include: - - push \ No newline at end of file