Skip to content

Build and push nightly Pihole-Unbound-image #430

Build and push nightly Pihole-Unbound-image

Build and push nightly Pihole-Unbound-image #430

Workflow file for this run

name: Build and push nightly Pihole-Unbound-image
on:
# cron job to trigger the build on any push to dev
#push:
#branches:
# - paths: 'Dockerfile_nightly'
# - 'main'
schedule:
# cron job to trigger the build dialy (time in UTC)
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Manually trigger nightly run'
required: false
type: boolean
environment:
description: 'Environment to run tests against'
type: environment
required: true
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Get latest release of pihole docker
uses: rez0n/actions-github-release@main
id: pihole_version
env:
token: ${{ secrets.GITHUB_TOKEN }}
repository: "pi-hole/docker-pi-hole"
type: "nightly"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
-
name: Build and push nightly image
uses: docker/build-push-action@v3
with:
build-args: PIHOLE_VERSION=${{ steps.pihole_version.outputs.release }}
context: "{{defaultContext}}:pihole-unbound/"
file: "Dockerfile_nightly"
platforms: linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/386
push: true
tags: pluim003/pihole-unbound:nightly