From d566e573d4ffd13c58810c4227e0d12497f7fa46 Mon Sep 17 00:00:00 2001
From: Felix Ableitner <me@nutomic.com>
Date: Thu, 8 Apr 2021 13:47:30 +0200
Subject: [PATCH] Publish docker images from main

---
 .drone.yml | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 68 insertions(+), 4 deletions(-)

diff --git a/.drone.yml b/.drone.yml
index 64871ad..ce1f081 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -30,7 +30,39 @@ steps:
     commands:
       - yarn build:dev
 
-  - name: make release build and push to docker hub
+  - name: publish dev docker image
+    image: plugins/docker
+    settings:
+      dockerfile: Dockerfile
+      repo: dessalines/lemmy-ui
+      tags:
+        - dev-linux-arm64
+      username:
+        from_secret: docker_username
+      password:
+        from_secret: docker_password
+    when:
+      ref:
+        - refs/heads/main
+
+  - name: publish dev docker manifest
+    image: plugins/manifest
+    settings:
+      username:
+        from_secret: docker_username
+      password:
+        from_secret: docker_password
+      target: "dessalines/lemmy-ui:dev"
+      template: "dessalines/lemmy-ui:dev-OS-ARCH"
+      platforms:
+        - linux/amd64
+        - linux/arm64
+      ignore_missing: true
+    when:
+      ref:
+        - refs/heads/main
+
+  - name: publish release docker image
     image: plugins/docker
     settings:
       dockerfile: Dockerfile
@@ -45,7 +77,7 @@ steps:
       ref:
         - refs/tags/*
 
-  - name: push to docker manifest
+  - name: publish release docker manifest
     image: plugins/manifest
     settings: 
       username:
@@ -82,7 +114,39 @@ steps:
       ref:
         - refs/tags/*
 
-  - name: make release build and push to docker hub
+  - name: publish dev docker image
+    image: plugins/docker
+    settings:
+      dockerfile: Dockerfile
+      repo: dessalines/lemmy-ui
+      tags:
+        - dev-linux-arm64
+      username:
+        from_secret: docker_username
+      password:
+        from_secret: docker_password
+    when:
+      ref:
+        - refs/heads/main
+
+  - name: publish dev docker manifest
+    image: plugins/manifest
+    settings:
+      username:
+        from_secret: docker_username
+      password:
+        from_secret: docker_password
+      target: "dessalines/lemmy-ui:dev"
+      template: "dessalines/lemmy-ui:dev-OS-ARCH"
+      platforms:
+        - linux/amd64
+        - linux/arm64
+      ignore_missing: true
+    when:
+      ref:
+        - refs/heads/main
+
+  - name: publish release docker image
     image: plugins/docker
     settings:
       dockerfile: Dockerfile
@@ -97,7 +161,7 @@ steps:
       ref:
         - refs/tags/*
 
-  - name: push to docker manifest
+  - name: publish release docker manifest
     image: plugins/manifest
     settings: 
       username:
-- 
2.44.1