mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2026-04-20 00:39:56 +01:00
- Replace PIHOLE_VERSION with PIHOLE_DOCKER_TAG
- reorder some stuff in the main Dockerfile - Remove the CORE/WEB/FTL_VERSION args/env vars - tweaks to GHA build script after some hints from @crazy-max - always checkout dev versions of Pi-hole for nightly build, also make sure we're using dev branch of this repo - keep pihole checkout enabled for dev and nightly tags Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
34
.github/workflows/test-and-build.yaml
vendored
34
.github/workflows/test-and-build.yaml
vendored
@@ -9,7 +9,6 @@ on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -31,26 +30,14 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
if: github.event_name != 'schedule'
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Calculate the versions to use
|
||||
id: variables
|
||||
run: |
|
||||
# If trigged by schedule then container tag will be nightly, else it's either dev or whatever the tagged version number is
|
||||
PIHOLE_VERSION=$([ "${{ github.event_name == 'schedule' }}" = "true" ] && echo "nightly" || echo "${GITHUB_REF#refs/*/}")
|
||||
|
||||
# If we are building dev branch or nightly then we want to use the development branches of the core components
|
||||
# otherwise they will be unset and the main branches will be pulled
|
||||
if [ "${PIHOLE_VERSION}" = "dev" || "${PIHOLE_VERSION}" = "nightly" ]; then
|
||||
CORE_VERSION=development
|
||||
WEB_VERSION=devel
|
||||
FTL_VERSION=development
|
||||
fi
|
||||
|
||||
echo ::set-output name=CORE_VERSION::${CORE_VERSION}
|
||||
echo ::set-output name=WEB_VERSION::${WEB_VERSION}
|
||||
echo ::set-output name=FTL_VERSION::${FTL_VERSION}
|
||||
echo ::set-output name=PIHOLE_VERSION::${PIHOLE_VERSION}
|
||||
name: Checkout dev branch if we are building nightly
|
||||
if: github.event_name == 'schedule'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: dev
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
@@ -69,7 +56,9 @@ jobs:
|
||||
flavor: |
|
||||
latest=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
tags: |
|
||||
${{ steps.variables.outputs.PIHOLE_VERSION }}
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
@@ -90,10 +79,7 @@ jobs:
|
||||
context: .
|
||||
platforms: linux/amd64, linux/arm64, linux/386, linux/arm/v7, linux/arm/v6, linux/ppc64le
|
||||
build-args: |
|
||||
CORE_VERSION=${{ steps.variables.outputs.CORE_VERSION }}
|
||||
WEB_VERSION=${{ steps.variables.outputs.WEB_VERSION }}
|
||||
FTL_VERSION=${{ steps.variables.outputs.FTL_VERSION }}
|
||||
PIHOLE_VERSION=${{ steps.variables.outputs.PIHOLE_VERSION }}
|
||||
PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
Reference in New Issue
Block a user