2021-05-25 18:59:36 +00:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
2022-02-06 09:27:00 +00:00
|
|
|
name: Pihole DoH Container
|
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-12-03 11:52:36 +00:00
|
|
|
schedule:
|
2022-02-06 09:21:45 +00:00
|
|
|
- cron: "0 0 */15 * *"
|
2021-12-03 11:52:36 +00:00
|
|
|
|
2021-05-25 18:59:36 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
buildx:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-03 11:41:35 +00:00
|
|
|
|
|
|
|
- name: Set the version
|
2021-12-03 11:43:58 +00:00
|
|
|
id: set_version
|
2021-12-03 11:41:35 +00:00
|
|
|
run: |
|
|
|
|
echo VERSION=$(curl --silent "https://api.github.com/repos/pi-hole/docker-pi-hole/releases/latest" | jq -r '.["tag_name"]')>> $GITHUB_ENV
|
2021-05-25 18:59:36 +00:00
|
|
|
-
|
|
|
|
name: Checkout
|
2022-11-27 01:40:38 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-05-25 18:59:36 +00:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2022-11-27 01:40:38 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2021-05-25 18:59:36 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2022-11-27 01:40:38 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2023-02-02 12:23:59 +00:00
|
|
|
with:
|
2023-02-02 12:26:12 +00:00
|
|
|
version: v0.10.1
|
2021-05-25 18:59:36 +00:00
|
|
|
-
|
|
|
|
name: Login to Docker Hub
|
2023-01-31 13:05:35 +00:00
|
|
|
uses: docker/login-action@v2
|
2021-05-25 18:59:36 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
2021-12-03 10:43:29 +00:00
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2021-12-03 11:46:02 +00:00
|
|
|
|
2021-05-25 18:59:36 +00:00
|
|
|
-
|
2021-12-03 11:23:54 +00:00
|
|
|
name: build pihole $VERSION
|
2023-02-02 12:23:59 +00:00
|
|
|
run: docker buildx build --provenance=false --platform=linux/amd64,linux/arm64 --build-arg VERSION=${{ env.VERSION }} run-pihole -t boostchicken/pihole:latest -t boostchicken/pihole:${{ env.VERSION }} --push
|