Image buid #12479
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Image buid | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
outputs: | |
image-require-update: ${{ steps.check.outputs.needs-updating }} | |
steps: | |
- name: Docker Image Update Checker | |
id: check | |
uses: lucacome/docker-image-update-checker@v1 | |
with: | |
base-image: pihole/pihole:latest | |
image: devzwf/pihole-dot-doh:latest | |
if: ${{ github.event_name == 'schedule' }} | |
env: | |
DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }} | |
build: | |
needs: check | |
if: ${{ github.event_name != 'schedule' || needs.check.outputs.image-require-update == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Fetch latest release tag | |
uses: pozetroninc/[email protected] | |
id: latest-tag | |
with: | |
repository: pi-hole/docker-pi-hole | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: | | |
linux/arm64 | |
linux/amd64 | |
linux/arm/v8 | |
linux/arm/v7 | |
push: true | |
provenance: false | |
tags: | | |
devzwf/pihole-dot-doh:latest | |
devzwf/pihole-dot-doh:${{ steps.latest-tag.outputs.release }} |