Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

feat: add build&push docker image action

STEVEN247e37d5afcf
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..b8fe7484b
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,2 @@
+web/node_modules
+web/yarn.lock
diff --git a/.github/workflows/build-and-push-docker-image.yml b/.github/workflows/build-and-push-docker-image.yml
new file mode 100644
index 000000000..e90fea0cb
--- /dev/null
+++ b/.github/workflows/build-and-push-docker-image.yml
@@ -0,0 +1,31 @@
+name: build-and-push-docker-image
+
+on:
+ push:
+ branches:
+ - "main"
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Login to Docker Hub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKER_NEOSMEMO_USERNAME }}
+ password: ${{ secrets.DOCKER_NEOSMEMO_TOKEN }}
+
+ - name: Set up Docker Buildx
+ id: buildx
+ uses: docker/setup-buildx-action@v1
+
+ - name: Build and Push
+ id: docker_build
+ uses: docker/build-push-action@v2
+ with:
+ context: ./
+ file: ./Dockerfile
+ push: true
+ tags: ${{ secrets.DOCKER_NEOSMEMO_USERNAME }}/memos:latest
diff --git a/.gitignore b/.gitignore
index abc64caf4..cef08f01f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,8 +13,8 @@
*.log
tmp
-# Config
-config
+# Config (Need to put in env)
+# config
# Air (hot reload) generated
.air
diff --git a/config/consts.go b/config/consts.go
new file mode 100644
index 000000000..a06038621
--- /dev/null
+++ b/config/consts.go
@@ -0,0 +1,6 @@
+package config
+
+var (
+ GITHUB_CLIENTID = "187ba36888f152b06612"
+ GITHUB_SECRET = "10b6fec4146cbb7bdf64016b3cf0905366a35041"
+)