Browse Source

take 2

pull/356/head
GilbN 3 years ago
parent
commit
12be2dd795
  1. 19
      .github/workflows/docker-build.yml
  2. 4
      Dockerfile.aarch64
  3. 4
      Dockerfile.amd64
  4. 4
      Dockerfile.armhf

19
.github/workflows/docker-build.yml

@ -37,8 +37,7 @@ jobs:
run: | run: |
ARCHITECTURE=${{ matrix.architecture }} ARCHITECTURE=${{ matrix.architecture }}
echo ::set-output name=VERSION::${{ github.event.release.tag_name }} echo ::set-output name=VERSION::${{ github.event.release.tag_name }}
echo ::set-output name=platform::${ARCHITECTURE//-/\/} echo ::set-output name=platform::${ARCHITECTURE}
- name: Set current date as env variable - name: Set current date as env variable
id: date_time id: date_time
run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S') run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S')
@ -77,8 +76,8 @@ jobs:
if: ${{ github.event.release.target_commitish == 'master' }} if: ${{ github.event.release.target_commitish == 'master' }}
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . file: ./Dockerfile.${{ matrix.architecture }}
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: ${{ matrix.architecture }
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: latest, ${{ steps.prep.outputs.VERSION }} tags: latest, ${{ steps.prep.outputs.VERSION }}
labels: ${{ steps.metadata.outputs.labels }} labels: ${{ steps.metadata.outputs.labels }}
@ -88,8 +87,8 @@ jobs:
if: ${{ github.event.inputs.branch == 'master' }} if: ${{ github.event.inputs.branch == 'master' }}
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . file: ./Dockerfile.${{ matrix.architecture }}
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: ${{ matrix.architecture }
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: latest, ${{ github.event.inputs.tag }} tags: latest, ${{ github.event.inputs.tag }}
labels: ${{ steps.metadata.outputs.labels }} labels: ${{ steps.metadata.outputs.labels }}
@ -99,8 +98,8 @@ jobs:
if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }} if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }}
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . file: ./Dockerfile.${{ matrix.architecture }}
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: ${{ matrix.architecture }
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.metadata.outputs.tags }} tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }} labels: ${{ steps.metadata.outputs.labels }}
@ -111,8 +110,8 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
file: ./Dockerfile.${{ matrix.architecture }} file: ./Dockerfile.${{ matrix.architecture }}
platforms: ${{ steps.prep.outputs.platform }} platforms: ${{ matrix.architecture }
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.metadata.outputs.tags }} tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }} labels: ${{ steps.metadata.outputs.labels }}
build-args: TP_RELEASE=${{ steps.prep.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }} build-args: TP_RELEASE=${{ steps.prep.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }}, PLATFORM=${{ steps.prep.outputs.platform }}

4
Dockerfile.aarch64

@ -1,9 +1,9 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.14 FROM --platform=${BUILDPLATFORM} ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.14
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG TP_RELEASE ARG TP_RELEASE
LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE} Platform: ${BUILDPLATFORM}" LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE} Platform: ${ARCHITECTURE}"
LABEL maintainer="gilbn" LABEL maintainer="gilbn"
LABEL org.opencontainers.image.description DESCRIPTION LABEL org.opencontainers.image.description DESCRIPTION

4
Dockerfile.amd64

@ -1,9 +1,9 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.14 FROM --platform=${BUILDPLATFORM} ghcr.io/linuxserver/baseimage-alpine-nginx:3.14
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG TP_RELEASE ARG TP_RELEASE
LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE} Platform: ${BUILDPLATFORM}" LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE} Platform: ${ARCHITECTURE}"
LABEL maintainer="gilbn" LABEL maintainer="gilbn"
LABEL org.opencontainers.image.description DESCRIPTION LABEL org.opencontainers.image.description DESCRIPTION

4
Dockerfile.armhf

@ -1,9 +1,9 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.14 FROM --platform=${BUILDPLATFORM} ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.14
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG TP_RELEASE ARG TP_RELEASE
LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE} Platform: ${BUILDPLATFORM}" LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE} Platform: ${ARCHITECTURE}"
LABEL maintainer="gilbn" LABEL maintainer="gilbn"
LABEL org.opencontainers.image.description DESCRIPTION LABEL org.opencontainers.image.description DESCRIPTION

Loading…
Cancel
Save