From 19d1351716e9e786ae1cbe9459a80c9f97344209 Mon Sep 17 00:00:00 2001 From: awptechnologies Date: Sun, 15 Dec 2024 14:24:07 -0500 Subject: [PATCH] Build --- .gitea/workflows/pihole-build.yml | 4 +++- .gitea/workflows/pihole-build_dev.yml | 30 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/pihole-build_dev.yml diff --git a/.gitea/workflows/pihole-build.yml b/.gitea/workflows/pihole-build.yml index ead12ec..041107d 100644 --- a/.gitea/workflows/pihole-build.yml +++ b/.gitea/workflows/pihole-build.yml @@ -1,4 +1,4 @@ -name: Build and Push Docker Image +name: Build and Push Pihole Latest Image on: push: @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + with: + ref: main - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.gitea/workflows/pihole-build_dev.yml b/.gitea/workflows/pihole-build_dev.yml new file mode 100644 index 0000000..b781f43 --- /dev/null +++ b/.gitea/workflows/pihole-build_dev.yml @@ -0,0 +1,30 @@ +name: Build and Push Pihole Dev Image + +on: + push: + branches: + - dev + schedule: + - cron: "0 2 * * 1,4" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + ref: dev + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to Gitea Registry + run: echo ${{ secrets.BUILD }} | docker login gitea.awptechnologies.co -u ${{ vars.OWNER }} --password-stdin + + - name: Build Docker Image + run: docker build --no-cache -t gitea.awptechnologies.co/${{ vars.OWNER }}/pihole-unbound:dev . + + - name: Push Docker Image to Gitea + run: docker push gitea.awptechnologies.co/${{ vars.OWNER }}/pihole-unbound:dev