From 82aef46abee2c5dcd83ba9c953a31b2144a1a290 Mon Sep 17 00:00:00 2001 From: GilbN Date: Tue, 29 Mar 2022 21:30:10 +0200 Subject: [PATCH 01/10] remove curl --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 56604234..c8bc0f11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,7 @@ LABEL maintainer="gilbn" RUN \ echo " ## Installing packages ## " && \ apk add --no-cache --virtual=build-dependencies \ - python3 \ - curl && \ + python3 && \ echo "**** install theme.park ****" && \ mkdir -p /app/themepark From a8f460644216d0492c60d362721dbb545969d56c Mon Sep 17 00:00:00 2001 From: GilbN Date: Tue, 29 Mar 2022 21:31:22 +0200 Subject: [PATCH 02/10] fix: :bug: Landing page: text color fix --- resources/landing-page/css/custom.css | 12 ++++++++---- resources/landing-page/css/styles.css | 2 +- resources/landing-page/js/scripts.js | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/resources/landing-page/css/custom.css b/resources/landing-page/css/custom.css index 7a737bc8..a2f04186 100644 --- a/resources/landing-page/css/custom.css +++ b/resources/landing-page/css/custom.css @@ -73,7 +73,15 @@ section { background-color: rgba(0, 0, 0, 0.9); } } +#mainNav .navbar-nav .nav-item .nav-link { + color: var(--label-text-color); + } +#mainNav .navbar-nav .nav-item .nav-link:hover, +#mainNav .navbar-nav .nav-item .nav-link:active { + color: var(--label-text-color); + opacity: .8; +} @media (min-width: 992px) { #mainNav { box-shadow: none; @@ -127,10 +135,6 @@ section { } } -#mainNav .navbar-nav .nav-item .nav-link:hover, -#mainNav .navbar-nav .nav-item .nav-link:active { - color: var(--text-hover); -} #mainNav .navbar-nav .nav-item .nav-link.active { color: var(--link-color-hover) !important; diff --git a/resources/landing-page/css/styles.css b/resources/landing-page/css/styles.css index 50c9f91c..a9a30227 100644 --- a/resources/landing-page/css/styles.css +++ b/resources/landing-page/css/styles.css @@ -11006,7 +11006,7 @@ hr.light { } #mainNav .navbar-nav .nav-item .nav-link { - color: #6c757d; + color: var(--label-text-color); font-family: "Merriweather Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-weight: 700; font-size: 0.9rem; diff --git a/resources/landing-page/js/scripts.js b/resources/landing-page/js/scripts.js index b11cd4ad..80b17ab0 100644 --- a/resources/landing-page/js/scripts.js +++ b/resources/landing-page/js/scripts.js @@ -69,7 +69,7 @@ function injectTheme(theme,container="head") { var themeOptions; function addThemeData() { - let themeJsonUrl = "/themes.json" + let themeJsonUrl = "themes.json" fetch(themeJsonUrl) .then(response => response.json()) .then(json => { From 9b2d43722dc49df0526c4975350384abb81ad1a4 Mon Sep 17 00:00:00 2001 From: GilbN Date: Tue, 29 Mar 2022 21:33:17 +0200 Subject: [PATCH 03/10] feat: Adds TP_URLBASE env --- docker/root/defaults/default | 16 +++++++++++----- docker/root/etc/cont-init.d/50-config | 24 +++++++++++++++++++++++- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/docker/root/defaults/default b/docker/root/defaults/default index 5e698386..336c39c6 100644 --- a/docker/root/defaults/default +++ b/docker/root/defaults/default @@ -9,17 +9,23 @@ server { ssl_certificate /config/keys/cert.crt; ssl_certificate_key /config/keys/cert.key; - root /config/www; index index.html index.htm index.php; + #location#/ {return 302 $scheme://TP_DOMAIN/TP_URLBASE$request_uri;} + location / { + alias /config/www/; sub_filter_types *; - sub_filter 'https://theme-park.dev' $scheme://TP_DOMAIN; - sub_filter 'http://theme-park.dev' $scheme://TP_DOMAIN; - sub_filter 'https://develop.theme-park.dev' $scheme://TP_DOMAIN; - sub_filter 'http://develop.theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'https://theme-park.dev/' $scheme://TP_DOMAIN/TP_URLBASE/; + sub_filter 'http://theme-park.dev/' $scheme://TP_DOMAIN/TP_URLBASE/; + sub_filter 'https://develop.theme-park.dev/' $scheme://TP_DOMAIN/TP_URLBASE/; + sub_filter 'http://develop.theme-park.dev/' $scheme://TP_DOMAIN/TP_URLBASE/; sub_filter_once off; try_files $uri $uri/ /index.html; + + #SUBFOLDER SUBFILTERS + #sub_filter 'https://TP_DOMAIN' $scheme://TP_DOMAIN/TP_URLBASE; + #sub_filter 'http://TP_DOMAIN' $scheme://TP_DOMAIN/TP_URLBASE; } # Don't cache diff --git a/docker/root/etc/cont-init.d/50-config b/docker/root/etc/cont-init.d/50-config index e4c17df2..c0733ea0 100644 --- a/docker/root/etc/cont-init.d/50-config +++ b/docker/root/etc/cont-init.d/50-config @@ -10,6 +10,7 @@ PUID=${PUID}\\n\ PGID=${PGID}\\n\ TZ=${TZ}\\n\ TP_SCHEME=${TP_SCHEME}\\n\ +TP_URLBASE=${TP_URLBASE}\\n\ TP_DOMAIN=${TP_DOMAIN}\\n" if [[ -z ${TP_DOMAIN} ]]; then @@ -22,8 +23,29 @@ if [[ -z ${TP_SCHEME} ]]; then TP_SCHEME='https' fi +if [[ -z ${TP_URLBASE} ]]; then + TP_URLBASE='' +fi + +# Remove forward slash +case ${TP_URLBASE} in + *"/"*) + TP_URLBASE=$(echo "${TP_URLBASE}" | sed 's/\///g') + ;; +esac + DEFAULT='/defaults/default' -sed -i "s/TP_DOMAIN/${TP_DOMAIN} /g" ${DEFAULT} +if [[ ${TP_URLBASE} ]]; then + echo "seding location" + sed -i "s/location \//location \/${TP_URLBASE}/g" ${DEFAULT} + echo "seding TP_DOMAIN" + sed -i "s/TP_DOMAIN/${TP_DOMAIN}/g" ${DEFAULT} + sed -i "s/TP_URLBASE/${TP_URLBASE}/g" ${DEFAULT} + sed -i "s/#sub_filter/sub_filter/g" ${DEFAULT} + sed -i "s/#location#/location /g" ${DEFAULT} +elif [[ -z ${TP_URLBASE} ]]; then + sed -i "s/TP_DOMAIN\/TP_URLBASE/${TP_DOMAIN}/g" ${DEFAULT} +fi cp /defaults/default /config/nginx/site-confs # make our folders and links From 9e34388b8e2c03866440aaa7373505df0db9bf4b Mon Sep 17 00:00:00 2001 From: GilbN Date: Wed, 30 Mar 2022 22:55:19 +0200 Subject: [PATCH 04/10] fix: :bug: Fixes double sed'ing, and changes the TP_SCHEME default value to $scheme --- docker/root/etc/cont-init.d/50-config | 20 +++++++++++--------- themes.py | 8 ++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docker/root/etc/cont-init.d/50-config b/docker/root/etc/cont-init.d/50-config index c0733ea0..4480bde0 100644 --- a/docker/root/etc/cont-init.d/50-config +++ b/docker/root/etc/cont-init.d/50-config @@ -19,8 +19,8 @@ if [[ -z ${TP_DOMAIN} ]]; then fi if [[ -z ${TP_SCHEME} ]]; then - echo 'No scheme set, defaulting to https' - TP_SCHEME='https' + echo 'No scheme set, defaulting to $scheme' + TP_SCHEME='$scheme' fi if [[ -z ${TP_URLBASE} ]]; then @@ -36,15 +36,17 @@ esac DEFAULT='/defaults/default' if [[ ${TP_URLBASE} ]]; then - echo "seding location" - sed -i "s/location \//location \/${TP_URLBASE}/g" ${DEFAULT} - echo "seding TP_DOMAIN" - sed -i "s/TP_DOMAIN/${TP_DOMAIN}/g" ${DEFAULT} - sed -i "s/TP_URLBASE/${TP_URLBASE}/g" ${DEFAULT} - sed -i "s/#sub_filter/sub_filter/g" ${DEFAULT} - sed -i "s/#location#/location /g" ${DEFAULT} + if ! grep -q "location /${TP_URLBASE} {" "${DEFAULT}"; then + sed -i "s/location \//location \/${TP_URLBASE}/g" ${DEFAULT} + sed -i "s/TP_DOMAIN/${TP_DOMAIN}/g" ${DEFAULT} + sed -i "s/TP_URLBASE/${TP_URLBASE}/g" ${DEFAULT} + sed -i "s/#sub_filter/sub_filter/g" ${DEFAULT} + sed -i "s/#location#/location /g" ${DEFAULT} + sed -i "s/\$scheme/${TP_SCHEME}/g" ${DEFAULT} + fi elif [[ -z ${TP_URLBASE} ]]; then sed -i "s/TP_DOMAIN\/TP_URLBASE/${TP_DOMAIN}/g" ${DEFAULT} + sed -i "s/\$scheme/${TP_SCHEME}/g" ${DEFAULT} fi cp /defaults/default /config/nginx/site-confs diff --git a/themes.py b/themes.py index 6458561a..84a187c9 100644 --- a/themes.py +++ b/themes.py @@ -119,20 +119,20 @@ def create_json(app_folders: list = None, themes: list = None, community_themes: def create_theme_options(): def create_css(folder): with open(f"{folder}/{app}/{theme.lower()}.css", "w") as create_app: - content = f'@import url("{applications[app]["base_css"]}");\n@import url("{themes[theme]["url"]}");' + content = f'@import url("{applications[app]["base_css"]}");\n@import url("{all_themes[theme]["url"]}");' create_app.write(content) with open("themes.json") as themes: data = load(themes) - themes = data["all-themes"] + all_themes = data["all-themes"] applications = data["applications"] for app in applications: - for theme in themes: + for theme in all_themes: folders = ["./css/base"] for folder in folders: create_css(folder) env_domain = env.get('TP_DOMAIN') -scheme = env.get('TP_SCHEME','https') +scheme = env.get('TP_SCHEME','https') if env.get('TP_SCHEME') != '$scheme' else 'https' if __name__ == "__main__": app_folders = [name for name in listdir('./css/base') if isdir(join('./css/base', name))] From 3db16b9a0f258d0424a69cd79838da2983ea317a Mon Sep 17 00:00:00 2001 From: GilbN Date: Thu, 31 Mar 2022 20:54:30 +0200 Subject: [PATCH 05/10] testing --- .github/workflows/docker-build.yml | 76 ++++++++++-------------------- Dockerfile | 4 +- 2 files changed, 27 insertions(+), 53 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 155a1d17..151f08ab 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -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 - 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 + - name: build&push testing + if: ${{ github.ref == 'refs/heads/testing' || github.event.inputs.branch == 'testing' }} + uses: docker/build-push-action@v2 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 }} diff --git a/Dockerfile b/Dockerfile index c8bc0f11..47509e13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ From 35023ce113883ee4303b19c90e46d8085ef00098 Mon Sep 17 00:00:00 2001 From: GilbN Date: Thu, 31 Mar 2022 21:06:37 +0200 Subject: [PATCH 06/10] testing --- .github/workflows/docker-build.yml | 2 +- Dockerfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 151f08ab..466cf8a5 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -58,7 +58,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64,linux/arm/v8 + platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.metadata.outputs.tags }} labels: ${{ steps.metadata.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 47509e13..b1f977e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ ARG BUILD_DATE ARG TP_RELEASE LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE} Platform: ${BUILDPLATFORM}" LABEL maintainer="gilbn" +LABEL org.opencontainers.image.description DESCRIPTION RUN \ echo " ## Installing packages ## " && \ From c2aa65f91f0fd879f6bdf0e480e712ab141ef44e Mon Sep 17 00:00:00 2001 From: GilbN Date: Fri, 1 Apr 2022 00:07:57 +0200 Subject: [PATCH 07/10] fix: :bug: Active button color fix --- css/base/tautulli/tautulli-base.css | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/css/base/tautulli/tautulli-base.css b/css/base/tautulli/tautulli-base.css index ba1e8e8b..87bb33e9 100644 --- a/css/base/tautulli/tautulli-base.css +++ b/css/base/tautulli/tautulli-base.css @@ -218,7 +218,8 @@ select, } /* Buttons */ -.btn-dark { +.btn-dark, +.btn-dark.inactive:hover { background-color: var(--button-color); border-color: var(--button-color); color: var(--button-text); @@ -231,6 +232,7 @@ select, } .btn-dark:active, +.btn-dark:active:hover, .btn-dark.active, .open>.dropdown-toggle.btn-dark, .btn-dark.active:focus { @@ -239,6 +241,11 @@ select, border-color: var(--button-color-hover); } +.btn-filter.active, .btn-filter.active.focus, +.btn-filter.active:hover { + background-color: var(--button-color-hover) !important; +} + .btn:focus:not(select), .btn.focus:not(select), .btn-dark:focus:not(select), @@ -252,10 +259,6 @@ select, background-color: var(--button-color-hover); } -.btn-dark.inactive:hover { - background-color: rgba(255, 255, 255, 0.08); -} - .btn-danger.btn-edit { background-color: rgba(255, 255, 255, 0.25); } From 5c3b9092bff26c932791ab2e48c777c7bccbf615 Mon Sep 17 00:00:00 2001 From: GilbN Date: Fri, 1 Apr 2022 22:03:32 +0200 Subject: [PATCH 08/10] fix: :bug: fixes 404 errors when using urlbase --- resources/landing-page/js/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/landing-page/js/scripts.js b/resources/landing-page/js/scripts.js index 80b17ab0..14a3e8f7 100644 --- a/resources/landing-page/js/scripts.js +++ b/resources/landing-page/js/scripts.js @@ -56,7 +56,7 @@ function injectTheme(theme,container="head") { } else html_element = document.body; let themeOption = document.getElementById("theme-option") let link = themeOption ? themeOption : document.createElement("link"); - url = "/css/theme-options" + url = `${window.location.pathname}css/theme-options` link.type = "text/css"; link.rel = "stylesheet"; link.href = `${url}/${themeLower}.css`; @@ -145,7 +145,7 @@ function fadeOutIn(speed) { } function updateMetaThemeColor() { - fetch(`/css/theme-options/${Object.keys(themeOptions)[currentIndex].toLowerCase()}.css`) + fetch(`${window.location.pathname}css/theme-options/${Object.keys(themeOptions)[currentIndex].toLowerCase()}.css`) .then(response => response.text()) .then(text => { let re = text.match("--accent-color:.*;")[0] From 13f1550d900ee00ef72886c5504a6f80f37cd3d8 Mon Sep 17 00:00:00 2001 From: GilbN Date: Sat, 2 Apr 2022 15:15:18 +0200 Subject: [PATCH 09/10] workflow update --- .github/workflows/docker-build.yml | 62 ++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 466cf8a5..996ea765 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -10,16 +10,19 @@ on: required: true type: choice options: + - master + - develop - testing tag: description: 'Add a tag' push: branches: + - develop - testing paths-ignore: - '.github/**' jobs: - push_to_ghcr_io: + build-and-push-it-to-the-limit: runs-on: ubuntu-latest steps: - name: checkout @@ -29,36 +32,81 @@ jobs: - 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: 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 + id: metadata 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 + gilbn/theme.park tags: | - testing + type=ref,event=branch + - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GH_PAT }} + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DH_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: build&push master + if: ${{ github.event.release.target_commitish == 'master' }} + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.metadata.outputs.tags }}, latest, latest-${{ runner.arch }} + labels: ${{ steps.metadata.outputs.labels }} + build-args: TP_RELEASE=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }} + + - name: manual build&push master + if: ${{ github.event.inputs.branch == 'master' }} + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.metadata.outputs.tags }}, latest, ${{ github.event.inputs.tag }}, latest-${{ runner.arch }} + labels: ${{ steps.metadata.outputs.labels }} + build-args: TP_RELEASE=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }} + + - name: build&push develop + if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }} + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.metadata.outputs.tags }}, develop-${{ runner.arch }} + labels: ${{ steps.metadata.outputs.labels }} + build-args: TP_RELEASE=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }} + - name: build&push testing if: ${{ github.ref == 'refs/heads/testing' || github.event.inputs.branch == 'testing' }} uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 + platforms: linux/amd64,linux/arm/v7,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.metadata.outputs.tags }} + tags: ${{ steps.metadata.outputs.tags }}, testing-${{ runner.arch }} labels: ${{ steps.metadata.outputs.labels }} + build-args: TP_RELEASE=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }} From ae9a8f30b5d13db33ddc9c5a8e2d6ba6e1af44e2 Mon Sep 17 00:00:00 2001 From: GilbN Date: Sat, 2 Apr 2022 15:44:56 +0200 Subject: [PATCH 10/10] tag fix --- .github/workflows/docker-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 996ea765..8a6875a6 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -74,7 +74,7 @@ jobs: context: . platforms: linux/amd64,linux/arm/v7,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.metadata.outputs.tags }}, latest, latest-${{ runner.arch }} + tags: latest labels: ${{ steps.metadata.outputs.labels }} build-args: TP_RELEASE=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }} @@ -85,7 +85,7 @@ jobs: context: . platforms: linux/amd64,linux/arm/v7,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.metadata.outputs.tags }}, latest, ${{ github.event.inputs.tag }}, latest-${{ runner.arch }} + tags: latest, ${{ github.event.inputs.tag }} labels: ${{ steps.metadata.outputs.labels }} build-args: TP_RELEASE=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }} @@ -96,7 +96,7 @@ jobs: context: . platforms: linux/amd64,linux/arm/v7,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.metadata.outputs.tags }}, develop-${{ runner.arch }} + tags: ${{ steps.metadata.outputs.tags }} labels: ${{ steps.metadata.outputs.labels }} build-args: TP_RELEASE=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }} @@ -107,6 +107,6 @@ jobs: context: . platforms: linux/amd64,linux/arm/v7,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.metadata.outputs.tags }}, testing-${{ runner.arch }} + tags: ${{ steps.metadata.outputs.tags }} labels: ${{ steps.metadata.outputs.labels }} build-args: TP_RELEASE=${{ steps.get_version.outputs.VERSION }},BUILD_DATE=${{ steps.date_time.outputs.NOW }}