mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-18 21:03:30 +02:00
709fb144f1
Multiple changes made to the CI workflow. Docker images are now built for AMD64, ARM64 and ARMv7 Docker images are now built for each release and published on docker hub Release workflow now successfully create release and upload assets Added ARM64 to list of binaries compiled during release
112 lines
3.4 KiB
YAML
112 lines
3.4 KiB
YAML
name: Main
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
docker-build:
|
|
name: Docker
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Prepare
|
|
id: prepare
|
|
run: |
|
|
DOCKER_IMAGE=embarkstudios/wireguard-ui
|
|
DOCKER_PLATFORMS=linux/amd64,linux/arm64,linux/arm/v7
|
|
VERSION=latest
|
|
|
|
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
|
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
|
echo ::set-output name=version::${VERSION}
|
|
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
|
|
--build-arg VERSION=${VERSION} \
|
|
${TAGS} --file Dockerfile .
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: crazy-max/ghaction-docker-buildx@master
|
|
-
|
|
name: Docker Buildx (build)
|
|
run: |
|
|
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
|
|
-
|
|
name: Docker Login
|
|
if: success()
|
|
env:
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
run: |
|
|
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
|
|
-
|
|
name: Docker Buildx (push)
|
|
if: success()
|
|
run: |
|
|
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
|
|
-
|
|
name: Docker Check Manifest
|
|
if: always()
|
|
run: |
|
|
docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
|
|
-
|
|
name: Clear
|
|
if: always()
|
|
run: |
|
|
rm -f ${HOME}/.docker/config.json
|
|
|
|
docker-debug:
|
|
name: Debug
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Prepare
|
|
id: prepare
|
|
run: |
|
|
DOCKER_IMAGE=embarkstudios/wireguard-ui
|
|
DOCKER_PLATFORMS=linux/amd64,linux/arm64,linux/arm/v7
|
|
VERSION=debug
|
|
|
|
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
|
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
|
echo ::set-output name=version::${VERSION}
|
|
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
|
|
--build-arg VERSION=${VERSION} \
|
|
${TAGS} --file Dockerfile.debug .
|
|
-
|
|
name: Set up Buildx
|
|
uses: crazy-max/ghaction-docker-buildx@master
|
|
-
|
|
name: Bocker Buildx (build)
|
|
run: |
|
|
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
|
|
-
|
|
name: Docker Login
|
|
if: success()
|
|
env:
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
run: |
|
|
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
|
|
-
|
|
name: Docker Buildx (push)
|
|
if: success()
|
|
run: |
|
|
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
|
|
-
|
|
name: Docker Check Manifest
|
|
if: always()
|
|
run: |
|
|
docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
|
|
-
|
|
name: Clear
|
|
if: always()
|
|
run: |
|
|
rm -f ${HOME}/.docker/config.json
|