mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: add build&push docker image action
* feat: add build&push docker image action * fix file end line
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
web/node_modules
|
||||||
|
web/yarn.lock
|
31
.github/workflows/build-and-push-docker-image.yml
vendored
Normal file
31
.github/workflows/build-and-push-docker-image.yml
vendored
Normal file
@@ -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
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -13,8 +13,8 @@
|
|||||||
*.log
|
*.log
|
||||||
tmp
|
tmp
|
||||||
|
|
||||||
# Config
|
# Config (Need to put in env)
|
||||||
config
|
# config
|
||||||
|
|
||||||
# Air (hot reload) generated
|
# Air (hot reload) generated
|
||||||
.air
|
.air
|
||||||
|
6
config/consts.go
Normal file
6
config/consts.go
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
var (
|
||||||
|
GITHUB_CLIENTID = "187ba36888f152b06612"
|
||||||
|
GITHUB_SECRET = "10b6fec4146cbb7bdf64016b3cf0905366a35041"
|
||||||
|
)
|
Reference in New Issue
Block a user