mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-12-18 00:13:23 +00:00
Github workflow to build multi arch docker image, thx to zmingxie
This commit is contained in:
parent
14660f487d
commit
8d6a05e2d9
41
.github/workflows/dockerimage.yml
vendored
Normal file
41
.github/workflows/dockerimage.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Build multi-arch Docker Images via buildx
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-buildx:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_IMAGE_NAME: vx3r/wg-gen-web
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
-
|
||||||
|
name: Build Docker Images Only
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: ilteoood/docker_buildx@master
|
||||||
|
with:
|
||||||
|
publish: false
|
||||||
|
tag: dev
|
||||||
|
dockerFile: ./Dockerfile
|
||||||
|
platform: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
imageName: ${{ env.DOCKER_IMAGE_NAME }}
|
||||||
|
-
|
||||||
|
name: Build and Publish Docker Images
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
|
uses: ilteoood/docker_buildx@master
|
||||||
|
with:
|
||||||
|
publish: true
|
||||||
|
tag: latest
|
||||||
|
dockerFile: ./Dockerfile
|
||||||
|
platform: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
imageName: ${{ env.DOCKER_IMAGE_NAME }}
|
||||||
|
dockerHubUser: ${{ secrets.DOCKER_LOGIN_USERNAME }}
|
||||||
|
dockerHubPassword: ${{ secrets.DOCKER_LOGIN_PASSWORD }}
|
@ -7,7 +7,7 @@ build:
|
|||||||
image: docker:latest
|
image: docker:latest
|
||||||
script:
|
script:
|
||||||
- docker info
|
- docker info
|
||||||
- docker build --network br_docker --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA} --tag ${CI_REGISTRY_IMAGE}:latest .
|
- docker build --network br_docker --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA} .
|
||||||
|
|
||||||
push:
|
push:
|
||||||
stage: push docker hub
|
stage: push docker hub
|
||||||
@ -17,4 +17,3 @@ push:
|
|||||||
script:
|
script:
|
||||||
- echo ${REGISTRY_PASSWORD} | docker login -u ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY}
|
- echo ${REGISTRY_PASSWORD} | docker login -u ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY}
|
||||||
- docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
|
- docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
|
||||||
- docker push ${CI_REGISTRY_IMAGE}:latest
|
|
||||||
|
@ -8,7 +8,6 @@ WORKDIR /app
|
|||||||
COPY ui/package*.json ./
|
COPY ui/package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY ui/ ./
|
COPY ui/ ./
|
||||||
RUN ls -l
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
@ -8,6 +8,7 @@ Simple Web based configuration generator for [WireGuard](https://wireguard.com).
|
|||||||
[![Go Report Card](https://goreportcard.com/badge/github.com/vx3r/wg-gen-web)](https://goreportcard.com/report/github.com/vx3r/wg-gen-web)
|
[![Go Report Card](https://goreportcard.com/badge/github.com/vx3r/wg-gen-web)](https://goreportcard.com/report/github.com/vx3r/wg-gen-web)
|
||||||
![Gitlab pipeline status (self-hosted)](https://img.shields.io/gitlab/pipeline/vx3r/wg-gen-web?gitlab_url=https%3A%2F%2Fgitlab.127-0-0-1.fr%2F)
|
![Gitlab pipeline status (self-hosted)](https://img.shields.io/gitlab/pipeline/vx3r/wg-gen-web?gitlab_url=https%3A%2F%2Fgitlab.127-0-0-1.fr%2F)
|
||||||
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](http://www.wtfpl.net/about/)
|
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](http://www.wtfpl.net/about/)
|
||||||
|
![Build multi-arch Docker Images via buildx](https://github.com/vx3r/wg-gen-web/workflows/Build%20multi-arch%20Docker%20Images%20via%20buildx/badge.svg)
|
||||||
![GitHub last commit](https://img.shields.io/github/last-commit/vx3r/wg-gen-web)
|
![GitHub last commit](https://img.shields.io/github/last-commit/vx3r/wg-gen-web)
|
||||||
![Docker Pulls](https://img.shields.io/docker/pulls/vx3r/wg-gen-web)
|
![Docker Pulls](https://img.shields.io/docker/pulls/vx3r/wg-gen-web)
|
||||||
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vx3r/wg-gen-web)
|
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vx3r/wg-gen-web)
|
||||||
|
Loading…
Reference in New Issue
Block a user