mirror of
https://github.com/gilbN/theme.park.git
synced 2024-10-26 23:02:54 +02:00
testing
This commit is contained in:
parent
9b2d43722d
commit
3db16b9a0f
76
.github/workflows/docker-build.yml
vendored
76
.github/workflows/docker-build.yml
vendored
@ -10,13 +10,12 @@ on:
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- master
|
||||
- develop
|
||||
- testing
|
||||
tag:
|
||||
description: 'Add a tag'
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- testing
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
jobs:
|
||||
@ -33,58 +32,33 @@ jobs:
|
||||
- name: Set current date as env variable
|
||||
id: date_time
|
||||
run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S')
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Docker meta
|
||||
id: metadata # you'll use this in the next step
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: |
|
||||
ghcr.io/gilbn/theme.park
|
||||
# Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
testing
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_PAT }}
|
||||
- name: build&push master
|
||||
if: ${{ github.event.release.target_commitish == 'master' }}
|
||||
run: |
|
||||
docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} .
|
||||
docker push --all-tags ghcr.io/gilbn/theme.park
|
||||
- name: manual build&push master
|
||||
if: ${{ github.event.inputs.branch == 'master' }}
|
||||
run: |
|
||||
docker build --build-arg TP_RELEASE=${{ github.event.inputs.tag }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ github.event.inputs.tag }} .
|
||||
docker push --all-tags ghcr.io/gilbn/theme.park
|
||||
- name: build&push develop
|
||||
if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }}
|
||||
run: |
|
||||
docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop .
|
||||
docker push --all-tags ghcr.io/gilbn/theme.park
|
||||
push_to_dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: build&push testing
|
||||
if: ${{ github.ref == 'refs/heads/testing' || github.event.inputs.branch == 'testing' }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${{ github.event.release.tag_name }}
|
||||
- name: Set current date as env variable
|
||||
id: date_time
|
||||
run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S')
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DH_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: build&push dh master
|
||||
if: ${{ github.event.release.target_commitish == 'master' }}
|
||||
run: |
|
||||
docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} .
|
||||
docker push --all-tags gilbn/theme.park
|
||||
- name: manual build&push dh master
|
||||
if: ${{ github.event.inputs.branch == 'master' }}
|
||||
run: |
|
||||
docker build --build-arg TP_RELEASE=${{ github.event.inputs.tag }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park --tag gilbn/theme.park:${{ github.event.inputs.tag }} .
|
||||
docker push --all-tags gilbn/theme.park
|
||||
- name: build&push dh develop
|
||||
if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }}
|
||||
run: |
|
||||
docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop .
|
||||
docker push --all-tags gilbn/theme.park
|
||||
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm/v8
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.metadata.outputs.tags }}
|
||||
labels: ${{ steps.metadata.outputs.labels }}
|
||||
|
@ -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
|
||||
ARG BUILD_DATE
|
||||
ARG TP_RELEASE
|
||||
LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE} Platform: ${BUILDPLATFORM}"
|
||||
LABEL maintainer="gilbn"
|
||||
|
||||
RUN \
|
||||
|
Loading…
Reference in New Issue
Block a user