diff --git a/.github/workflows/pihole-dote.yml b/.github/workflows/pihole-dote.yml index 6c147f0..05c1a61 100644 --- a/.github/workflows/pihole-dote.yml +++ b/.github/workflows/pihole-dote.yml @@ -9,11 +9,17 @@ on: push: paths: - run-pihole/DoTE.Dockerfile - + schedule: + - cron: "* 12 */14 * *" + jobs: buildx: runs-on: ubuntu-latest steps: + - name: Set the version + id: set_version + run: | + echo VERSION=$(curl --silent "https://api.github.com/repos/pi-hole/docker-pi-hole/releases/latest" | jq -r '.["tag_name"]')>> $GITHUB_ENV - name: Checkout uses: actions/checkout@v2 @@ -32,4 +38,4 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: build pihole dote - run: docker buildx build --platform=linux/amd64,linux/arm64 run-pihole -f run-pihole/DoTE.Dockerfile -t boostchicken/pihole-dote:latest --push + run: docker buildx build --platform=linux/amd64,linux/arm64 --build-args VERSION=${{ env.VERSION }} run-pihole -f run-pihole/DoTE.Dockerfile -t boostchicken/pihole-dote:latest -t boostchicken/pihole-dote:${{ env.VERSION }} --push