1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-04-14 03:32:01 +02:00

Optimize Docker build process

This commit is contained in:
Kovah 2021-03-25 20:22:11 +01:00
parent 5aafea6fe4
commit bad62762f2
No known key found for this signature in database
GPG Key ID: AAAA031BA9830D7B
2 changed files with 4 additions and 36 deletions

View File

@ -3,8 +3,6 @@ name: Build simple LinkAce Docker image
on:
push:
branches:
- master
tags:
- "*"
@ -21,24 +19,9 @@ jobs:
id: prep
run: |
DOCKER_IMAGE=linkace/linkace
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/master ]]; then
VERSION=php-nginx
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
MINOR=${VERSION%.*}
MAJOR=${MINOR%.*}
TAGS="$TAGS-php-nginx,${DOCKER_IMAGE}:php-nginx"
fi
echo ::set-output name=version::${VERSION}
VERSION=${GITHUB_REF#refs/tags/}
TAGS="${DOCKER_IMAGE}:${VERSION}-php-nginx,${DOCKER_IMAGE}:php-nginx,${DOCKER_IMAGE}:${VERSION}-simple,${DOCKER_IMAGE}:simple"
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

View File

@ -3,8 +3,6 @@ name: Build regular LinkAce Docker image
on:
push:
branches:
- master
tags:
- "*"
@ -21,22 +19,9 @@ jobs:
id: prep
run: |
DOCKER_IMAGE=linkace/linkace
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/master ]]; then
VERSION=latest
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
fi
echo ::set-output name=version::${VERSION}
VERSION=${GITHUB_REF#refs/tags/}
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest"
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up QEMU
uses: docker/setup-qemu-action@v1