From 0faa4470fb41ea2f7ea2770b905bf7e17b7893cc Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Thu, 9 Sep 2021 19:28:02 +0900
Subject: [PATCH] =?UTF-8?q?GitHub=20Actions=E3=81=A7Docker=20Hub=E3=81=B8?=
 =?UTF-8?q?=E3=81=AEpush=E3=82=92=E8=A1=8C=E3=81=86=E3=82=88=E3=81=86?=
 =?UTF-8?q?=E3=81=AB=20(#7782)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Create docker.yml

* Update .github/workflows/docker.yml

Co-authored-by: tamaina <tamaina@hotmail.co.jp>

* add workflow_dispatch

* Multi-platform image

* Revert "Multi-platform image"

This reverts commit e5bac6632909a5020b0708227ebe248b443c2c2b.

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
---
 .github/workflows/docker.yml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 .github/workflows/docker.yml

diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
new file mode 100644
index 0000000000..1c6ad343e3
--- /dev/null
+++ b/.github/workflows/docker.yml
@@ -0,0 +1,32 @@
+name: Publish Docker image
+
+on:
+  release:
+    types: [published]
+  workflow_dispatch:
+
+jobs:
+  push_to_registry:
+    name: Push Docker image to Docker Hub
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+      - name: Docker meta
+        id: meta
+        uses: docker/metadata-action@v3
+        with:
+          images: misskey/misskey
+      - name: Log in to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKER_USERNAME }}
+          password: ${{ secrets.DOCKER_PASSWORD }}
+      - name: Build and Push to Docker Hub
+        uses: docker/build-push-action@v2
+        with:
+          context: .
+          push: true
+          tags: ${{ steps.meta.outputs.tags }}
+          labels: ${{ steps.meta.outputs.labels }}