Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Build & Publish Docker Image to Docker Hub #257

Build & Publish Docker Image to Docker Hub

Build & Publish Docker Image to Docker Hub #257

name: Build & Publish Docker Image to Docker Hub
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * *"
jobs:
deploy:
name: Build & Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: production
- 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: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Set environment variables
- run: echo VERSION=$(cat ./VERSION) >> $GITHUB_ENV
# Build & Publish
- name: Build & Publish Docker Image
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
tags: peterlewis/pihole-unbound:nightly, peterlewis/pihole-unbound:${{ env.VERSION }}-nightly