Move to Github actions buildx

- Latest, release and pr buildx setup
- Build x-arch for amd64, 386 and arm devices
master
Quentin McGaw 4 years ago
parent 056fb2493e
commit 3336ae3b95

@ -0,0 +1,22 @@
name: Docker build
on:
pull_request:
branches: [master]
paths-ignore:
- .github/workflows/buildx-latest.yml
- .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 .

@ -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/stackedit:latest \
--push \
.
- run: curl -X POST https://hooks.microbadger.com/images/qmcgaw/stackedit/Sb9uic5BXTlu5QaQPtBP0V1bm1E= || exit 0

@ -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/stackedit:${GITHUB_REF##*/} \
--push \
.
- run: curl -X POST https://hooks.microbadger.com/images/qmcgaw/stackedit/Sb9uic5BXTlu5QaQPtBP0V1bm1E= || exit 0

@ -4,20 +4,16 @@
[![Docker StackEdit](https://github.com/qdm12/stackedit-docker/raw/master/title.png)](https://hub.docker.com/r/qmcgaw/stackedit/)
[![Docker Build Status](https://img.shields.io/docker/build/qmcgaw/stackedit.svg)](https://hub.docker.com/r/qmcgaw/stackedit)
[![GitHub last commit](https://img.shields.io/github/last-commit/qdm12/stackedit-docker.svg)](https://github.com/qdm12/stackedit-docker/commits)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/qdm12/stackedit-docker.svg)](https://github.com/qdm12/stackedit-docker/commits)
[![GitHub issues](https://img.shields.io/github/issues/qdm12/stackedit-docker.svg)](https://github.com/qdm12/stackedit-docker/issues)
[![Build status](https://github.com/qdm12/stackedit-docker/workflows/Buildx%20latest/badge.svg)](https://github.com/qdm12/stackedit-docker/actions?query=workflow%3A%22Buildx+latest%22)
[![Docker Pulls](https://img.shields.io/docker/pulls/qmcgaw/stackedit.svg)](https://hub.docker.com/r/qmcgaw/stackedit)
[![Docker Stars](https://img.shields.io/docker/stars/qmcgaw/stackedit.svg)](https://hub.docker.com/r/qmcgaw/stackedit)
[![Docker Automated](https://img.shields.io/docker/automated/qmcgaw/stackedit.svg)](https://hub.docker.com/r/qmcgaw/stackedit)
[![Image size](https://images.microbadger.com/badges/image/qmcgaw/stackedit.svg)](https://microbadger.com/images/qmcgaw/stackedit)
[![Image version](https://images.microbadger.com/badges/version/qmcgaw/stackedit.svg)](https://microbadger.com/images/qmcgaw/stackedit)
[![Donate PayPal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/qdm12)
[![GitHub last commit](https://img.shields.io/github/last-commit/qdm12/stackedit-docker.svg)](https://github.com/qdm12/stackedit-docker/commits)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/qdm12/stackedit-docker.svg)](https://github.com/qdm12/stackedit-docker/commits)
[![GitHub issues](https://img.shields.io/github/issues/qdm12/stackedit-docker.svg)](https://github.com/qdm12/stackedit-docker/issues)
[![Donate PayPal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/qmcgaw)
| Image size | RAM usage | CPU usage |
| --- | --- | --- |
@ -31,21 +27,12 @@
- [Scratch](https://hub.docker.com/_/scratch)
- Golang simple HTTP static server
- Running without root
- Cross cpu architecture compatible: amd64, 386, arm64v8, arm32v7 and arm32v6 (ask for more)
- Built-in Docker healthcheck
- Nice emojis in the logs...
## Setup
1. <details><summary>CLICK IF YOU HAVE AN ARM DEVICE</summary><p>
You need to build the Docker image yourself using `git` and `docker`
```sh
docker build -t qmcgaw/stackedit https://github.com/qdm12/stackedit-docker.git
```
</p></details>
1. Use the following command:
```sh

@ -1,5 +0,0 @@
#!/bin/bash
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
-t $IMAGE_NAME .

@ -1,3 +0,0 @@
#!/bin/bash
curl -X POST https://hooks.microbadger.com/images/qmcgaw/${DOCKER_REPO}/Sb9uic5BXTlu5QaQPtBP0V1bm1E= || exit 0
Loading…
Cancel
Save