Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Github actions instead of Docker hub
Browse files Browse the repository at this point in the history
- Build on release with a Docker tag
- Build for a bunch of cpu architectures
  • Loading branch information
qdm12 committed Jun 29, 2020
1 parent d828075 commit 3e660ed
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 63 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Docker build
on:
pull_request:
branches: [master]
paths-ignore:
- .github/workflows/buildx-release.yml
- .github/workflows/dockerhub-description.yml
- .dockerignore
- .gitignore
- docker-compose.yml
- LICENSE
- readme.md
- title.png
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build image
run: docker build .
35 changes: 35 additions & 0 deletions .github/workflows/buildx-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Buildx latest
on:
push:
branches: [master]
paths-ignore:
- .github/workflows/build.yml
- .github/workflows/buildx-release.yml
- .github/workflows/dockerhub-description.yml
- .dockerignore
- .gitignore
- docker-compose.yml
- LICENSE
- readme.md
- title.png
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Buildx setup
uses: crazy-max/ghaction-docker-buildx@v1
- name: Dockerhub login
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u qmcgaw --password-stdin 2>&1
- name: Run Buildx
run: |
docker buildx build \
--progress plain \
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6 \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VERSION=latest \
-t qmcgaw/meemo:latest \
--push \
.
- run: curl -X POST https://hooks.microbadger.com/images/qmcgaw/meemo/6C45PnFKaNnQg0HAtTnK1GANz64= || exit 0
35 changes: 35 additions & 0 deletions .github/workflows/buildx-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Buildx release
on:
release:
types: [published]
paths-ignore:
- .github/workflows/build.yml
- .github/workflows/buildx-latest.yml
- .github/workflows/dockerhub-description.yml
- .dockerignore
- .gitignore
- docker-compose.yml
- LICENSE
- readme.md
- title.png
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Buildx setup
uses: crazy-max/ghaction-docker-buildx@v1
- name: Dockerhub login
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u qmcgaw --password-stdin 2>&1
- name: Run Buildx
run: |
docker buildx build \
--progress plain \
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6 \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VERSION=${GITHUB_REF##*/} \
-t qmcgaw/meemo:${GITHUB_REF##*/} \
--push \
.
- run: curl -X POST https://hooks.microbadger.com/images/qmcgaw/meemo/6C45PnFKaNnQg0HAtTnK1GANz64= || exit 0
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARG BASE_IMAGE=alpine
ARG ALPINE_VERSION=3.12

FROM ${BASE_IMAGE}:${ALPINE_VERSION} AS builder
FROM alpine:${ALPINE_VERSION} AS builder
ARG MEEMO_VERSION=v1.13.0
RUN apk add -q --progress --update npm git python3-dev build-base
RUN git clone --branch ${MEEMO_VERSION} --single-branch --depth 1 https://github.com/nebulade/meemo.git /temp &> /dev/null
Expand All @@ -15,7 +14,7 @@ RUN npm --silent install
RUN npm --silent -g install gulp
RUN gulp default

FROM ${BASE_IMAGE}:${ALPINE_VERSION}
FROM alpine:${ALPINE_VERSION}
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
Expand Down
9 changes: 0 additions & 9 deletions hooks/build

This file was deleted.

3 changes: 0 additions & 3 deletions hooks/post_build

This file was deleted.

61 changes: 13 additions & 48 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,27 @@ Manage your todo list, bookmarks and data in the Markdown format with [**Meemo**

[![Docker Meemo](https://github.com/qdm12/meemo/raw/master/title.png)](https://hub.docker.com/r/qmcgaw/meemo/)

Docker build:
[![Docker Build Status](https://img.shields.io/docker/build/qmcgaw/meemo.svg)](https://hub.docker.com/r/qmcgaw/meemo)

Meemo build (external):
[![Build Status](https://travis-ci.org/nebulade/meemo.svg?branch=master)](https://travis-ci.org/nebulade/meemo)

[![GitHub last commit](https://img.shields.io/github/last-commit/qdm12/meemo.svg)](https://github.com/qdm12/meemo/commits)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/qdm12/meemo.svg)](https://github.com/qdm12/meemo/commits)
[![GitHub issues](https://img.shields.io/github/issues/qdm12/meemo.svg)](https://github.com/qdm12/meemo/issues)

[![Build status](https://github.com/qdm12/meemo/workflows/Buildx%20latest/badge.svg)](https://github.com/qdm12/meemo/actions?query=workflow%3A%22Buildx+latest%22)
[![Docker Pulls](https://img.shields.io/docker/pulls/qmcgaw/meemo.svg)](https://hub.docker.com/r/qmcgaw/meemo)
[![Docker Stars](https://img.shields.io/docker/stars/qmcgaw/meemo.svg)](https://hub.docker.com/r/qmcgaw/meemo)
[![Docker Automated](https://img.shields.io/docker/automated/qmcgaw/meemo.svg)](https://hub.docker.com/r/qmcgaw/meemo)

[![Image size](https://images.microbadger.com/badges/image/qmcgaw/meemo.svg)](https://microbadger.com/images/qmcgaw/meemo)
[![Image version](https://images.microbadger.com/badges/version/qmcgaw/meemo.svg)](https://microbadger.com/images/qmcgaw/meemo)

[![Donate PayPal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/qdm12)
[![Join Slack channel](https://img.shields.io/badge/slack-@qdm12-yellow.svg?logo=slack)](https://join.slack.com/t/qdm12/shared_invite/enQtOTE0NjcxNTM1ODc5LTYyZmVlOTM3MGI4ZWU0YmJkMjUxNmQ4ODQ2OTAwYzMxMTlhY2Q1MWQyOWUyNjc2ODliNjFjMDUxNWNmNzk5MDk)
[![GitHub last commit](https://img.shields.io/github/last-commit/qdm12/meemo.svg)](https://github.com/qdm12/meemo/commits)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/qdm12/meemo.svg)](https://github.com/qdm12/meemo/commits)
[![GitHub issues](https://img.shields.io/github/issues/qdm12/meemo.svg)](https://github.com/qdm12/meemo/issues)

| Image size | RAM usage | CPU usage |
| --- | --- | --- |
| 103MB | 70MB | Low |
[![Donate PayPal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/qmcgaw)

It is based on:
## Features

- [Meemo 1.13.0](https://github.com/nebulade/meemo) and its NodeJS dependencies
- [Alpine 3.12](https://alpinelinux.org)
- [NodeJS](https://pkgs.alpinelinux.org/package/v3.12/main/x86_64/nodejs)
- Lightweight (uncompressed amd64) size of 114MB
- Based on:
- [Meemo 1.13.0](https://github.com/nebulade/meemo) and its NodeJS dependencies
- [Alpine 3.12](https://alpinelinux.org)
- [NodeJS](https://pkgs.alpinelinux.org/package/v3.12/main/x86_64/nodejs)
- Compatible with `amd64`, `386`, `arm64`, `arm32v7` and `arm32v6` CPU architectures

It also depends on a MongoDB database which is launched with Docker Compose.

Expand All @@ -54,34 +47,6 @@ It also depends on a MongoDB database which is launched with Docker Compose.
chmod 700 data database
```

1. <details><summary>CLICK IF YOU HAVE AN ARM DEVICE</summary><p>

- If you have a ARM 32 bit v6 architecture

```sh
docker build -t qmcgaw/meemo \
--build-arg BASE_IMAGE=arm32v6/alpine \
https://github.com/qdm12/meemo.git
```

- If you have a ARM 32 bit v7 architecture

```sh
docker build -t qmcgaw/meemo \
--build-arg BASE_IMAGE=arm32v7/alpine \
https://github.com/qdm12/meemo.git
```

- If you have a ARM 64 bit v8 architecture

```sh
docker build -t qmcgaw/meemo \
--build-arg BASE_IMAGE=arm64v8/alpine \
https://github.com/qdm12/meemo.git
```

</p></details>

1. Download [**docker-compose.yml**](https://raw.githubusercontent.com/qdm12/meemo/master/docker-compose.yml) on your host, modify it as you wish:

```sh
Expand Down

0 comments on commit 3e660ed

Please sign in to comment.