Compare commits

...

5 Commits

Author SHA1 Message Date
a5446b782d switched from drone to gitea actions
Some checks failed
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64) (push) Successful in 12s
Container Publish / build-image (amd64) (push) Successful in 32s
Container Publish / update docker manifest (push) Successful in 9s
Vulnerability Scan / Daily Vulnerability Scan (arm64) (push) Failing after 5s
Vulnerability Scan / Daily Vulnerability Scan (amd64) (push) Failing after 7s
2025-06-08 13:36:13 +02:00
30e458be26 test new actions
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (push) Successful in 16s
2025-06-07 21:18:48 +02:00
160d389192 healthcheck fix
Some checks failed
Vulnerability Scan / Daily Vulnerability Scan (push) Failing after 13s
Container Publish / build-image (push) Successful in 34s
2025-05-06 09:30:00 +02:00
40ec940bad allow webserver access from everywhere 2025-05-06 09:27:33 +02:00
b267419a8f separate config for launch 2025-05-06 09:23:17 +02:00
6 changed files with 70 additions and 12 deletions

View File

@@ -1,6 +1,10 @@
---
name: Container Publish
env:
REGISTRY: docker.asperti.com
REPOSITORY: paspo/powerdns
on:
push:
tags:
@@ -8,23 +12,64 @@ on:
schedule:
- cron: "0 12 3 * *"
workflow_dispatch:
workflow_call:
workflow_run:
workflows: [vulnscan.yaml]
types: [completed]
jobs:
on-success-skip:
runs-on:
labels: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: exit_with_success
build-image:
runs-on: ubuntu-latest
runs-on:
labels: [ubuntu-latest, "arch-${{ matrix.arch }}"]
container:
image: catthehacker/ubuntu:act-latest
strategy:
matrix:
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Login to registry
uses: docker/login-action@v3
with:
registry: docker.asperti.com
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and publish
run: |
docker build -t docker.asperti.com/paspo/powerdns:latest --platform linux/amd64 -f Dockerfile .
docker push docker.asperti.com/paspo/powerdns:latest
docker build \
--tag ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-${{ matrix.arch }} \
--platform linux/${{ matrix.arch }} -f Dockerfile .
docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-${{ matrix.arch }}
manifest:
name: update docker manifest
needs: build-image
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: latest
run: |
docker manifest create \
${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest \
--amend ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-amd64 \
--amend ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-arm64
docker manifest push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest

View File

@@ -1,21 +1,33 @@
---
name: Vulnerability Scan
env:
REGISTRY: docker.asperti.com
REPOSITORY: paspo/powerdns
on:
schedule:
- cron: "0 14 * * *"
workflow_dispatch:
workflow_call:
workflow_run:
workflows: [build_and_publish.yaml]
types: [completed]
jobs:
scan:
name: Daily Vulnerability Scan
runs-on: ubuntu-latest
runs-on:
labels: [ubuntu-latest, "arch-${{ matrix.arch }}"]
container:
image: catthehacker/ubuntu:act-latest
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Pull docker image
run: docker pull docker.asperti.com/paspo/powerdns:latest
run: docker pull ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest
- name: Setup trivy
run: |
@@ -32,9 +44,7 @@ jobs:
- name: Run Trivy vulnerability scanner
id: scan
run: |
trivy --server ${{ secrets.TRIVY_SERVER }} \
--token ${{ secrets.TRIVY_TOKEN }} image --format json \
docker.asperti.com/paspo/powerdns:latest > trivy-results.json
trivy --server ${{ secrets.TRIVY_SERVER }} --token ${{ secrets.TRIVY_TOKEN }} image --format json ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest > trivy-results.json
# if some vulnerability is found, we fail
- name: check output

View File

@@ -2,11 +2,11 @@ FROM alpine:latest
RUN \
apk --update upgrade && \
apk add tini pdns pdns-backend-sqlite3
apk add tini curl pdns pdns-backend-sqlite3
COPY rootfs /
HEALTHCHECK --interval=30s --start-period=5s --timeout=10s \
CMD /usr/bin/host -T -p 1053 asperti.com 127.0.0.1
CMD curl http://127.0.0.1:8081/metrics
ENTRYPOINT ["/sbin/tini", "--", "/bin/sh", "/app/entrypoint.sh"]

View File

@@ -17,7 +17,6 @@ EOF
# database setup
cat >> /etc/pdns/pdns.conf.d/sqlite.conf << EOF
launch=gsqlite3
gsqlite3-database=${DB_PATH}
EOF
DB_DIR=$(dirname "${DB_PATH}")

View File

@@ -0,0 +1 @@
launch=gsqlite3

View File

@@ -0,0 +1,3 @@
webserver=yes
webserver-address=0.0.0.0
webserver-allow-from=0.0.0.0/0,::/0