unifios-utilities/.github/workflows/pihole.yml

39 lines
1.2 KiB
YAML
Raw Normal View History

2021-05-25 18:59:36 +00:00
# This is a basic workflow to help you get started with Actions
2021-12-03 11:23:54 +00:00
name: Boostchicken Pihole DoH Dockerbuild
2021-05-25 18:59:36 +00:00
# Controls when the action will run.
on:
2021-08-27 04:58:58 +00:00
workflow_dispatch:
2021-05-25 18:59:36 +00:00
# Triggers the workflow on push or pull request events but only for the master branch
2021-12-03 11:23:54 +00:00
push:
paths:
- run-pihole/Dockerfile
2021-05-25 18:59:36 +00:00
jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
2021-12-03 10:43:29 +00:00
password: ${{ secrets.DOCKERHUB_TOKEN }}
2021-12-03 11:23:54 +00:00
- name: install jq and get latest version
run: sudo apt update && sudo apt install -y curl jq && export VERSION=$(curl --silent "https://api.github.com/repos/pi-hole/docker-pi-hole/releases/latest" | jq -r '.["tag_name"]')
2021-05-25 18:59:36 +00:00
-
2021-12-03 11:23:54 +00:00
name: build pihole $VERSION
run: docker buildx build --platform=linux/amd64,linux/arm64 --build-arg VERSION=$VERSION run-pihole -t boostchicken/pihole:latest -t boostchicken:/pihole:$VERSION --push