diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f2150300..b5eef71c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -`{Please select 'base: dev' as target branch above! (you can delete this line)}` +`{Please select 'base: development' as target branch above! (you can delete this line)}` diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a350cbfd..06ff60f1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,7 +7,7 @@ updates: interval: "weekly" day: saturday time: "10:00" - target-branch: dev + target-branch: development reviewers: - "pi-hole/docker-maintainers" - package-ecosystem: "docker" @@ -16,7 +16,7 @@ updates: interval: "weekly" day: saturday time: "10:00" - target-branch: dev + target-branch: development reviewers: - "pi-hole/docker-maintainers" - package-ecosystem: pip @@ -26,35 +26,6 @@ updates: day: saturday time: "10:00" open-pull-requests-limit: 10 - target-branch: dev + target-branch: development reviewers: - - "pi-hole/docker-maintainers" - # Maintain dependencies for GitHub Actions development-v6 - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - day: saturday - time: "10:00" - target-branch: development-v6 - reviewers: - - "pi-hole/docker-maintainers" - - package-ecosystem: "docker" - directory: "/src/" - schedule: - interval: "weekly" - day: saturday - time: "10:00" - target-branch: development-v6 - reviewers: - - "pi-hole/docker-maintainers" - - package-ecosystem: pip - directory: "/test" - schedule: - interval: weekly - day: saturday - time: "10:00" - open-pull-requests-limit: 10 - target-branch: development-v6 - reviewers: - - "pi-hole/docker-maintainers" + - "pi-hole/docker-maintainers" \ No newline at end of file diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 28434cb0..d8cf2ae7 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -1,14 +1,18 @@ -name: Build and Publish (development-v6) +name: Build Image and Publish on: schedule: - cron: "0 5 * * *" push: branches: - - development-v6 + - development + release: + types: [published] + env: dockerhub: ${{ secrets.DOCKERHUB_NAMESPACE }}/pihole ghcr: ghcr.io/${{ github.repository_owner }}/pihole + components_branch: ${{ startsWith(github.ref, 'refs/tags/') && 'master' || 'development' }} jobs: build: @@ -29,7 +33,14 @@ jobs: echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Checkout Repo + if: github.event_name != 'schedule' + uses: actions/checkout@v4 + + - name: Checkout dev branch if scheduled + if: github.event_name == 'schedule' uses: actions/checkout@v4 + with: + ref: development - name: Docker meta id: meta @@ -40,9 +51,11 @@ jobs: ${{ env.dockerhub }} ${{ env.ghcr }} flavor: | - latest=false + latest=${{ startsWith(github.ref, 'refs/tags/') }} tags: | - development-v6 + type=schedule,pattern=nightly + type=ref,event=branch,enable=${{ github.event_name != 'schedule' }} + type=ref,event=tag - name: Login to DockerHub and GitHub Container Registry uses: ./.github/actions/login-repo @@ -68,7 +81,11 @@ jobs: platforms: ${{ matrix.platform }} build-args: | PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }} - alpine_version=${{ matrix.alpine_version }} + alpine_version=${{ matrix.alpine_version }} + FTL_BRANCH=${{ env.components_branch }} + CORE_BRANCH=${{ env.components_branch }} + WEB_BRANCH=${{ env.components_branch }} + PADD_BRANCH=${{ env.components_branch }} labels: ${{ steps.meta.outputs.labels }} outputs: | type=image,name=${{ env.dockerhub }},push-by-digest=true,name-canonical=true,push=true @@ -96,8 +113,15 @@ jobs: - build steps: - name: Checkout Repo + if: github.event_name != 'schedule' uses: actions/checkout@v4 + - name: Checkout dev branch if scheduled + if: github.event_name == 'schedule' + uses: actions/checkout@v4 + with: + ref: development + - name: Download digests uses: actions/download-artifact@v4 with: @@ -117,9 +141,11 @@ jobs: ${{ env.dockerhub }} ${{ env.ghcr }} flavor: | - latest=false + latest=${{ startsWith(github.ref, 'refs/tags/') }} tags: | - development-v6 + type=schedule,pattern=nightly + type=ref,event=branch,enable=${{ github.event_name != 'schedule' }} + type=ref,event=tag - name: Login to DockerHub and GitHub Container Registry uses: ./.github/actions/login-repo diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 598f908b..12d09974 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,4 +1,4 @@ -name: Build and Test (development-v6) +name: Build Image and Test on: pull_request: @@ -11,7 +11,9 @@ jobs: # Official docker images for docker are only available for amd64 and arm64 # TODO: Look at: https://github.com/docker-library/official-images#architectures-other-than-amd64 # Is testing on all platforms really necessary? - platform: [linux/amd64, linux/arm64] + # Disabled arm64 tests for the time being, something is wrong with the test config and the volumes are getting shared between the test containers on different architectures + #platform: [linux/amd64, linux/arm64] + platform: [linux/amd64] steps: - name: Checkout Repo uses: actions/checkout@v4 diff --git a/.github/workflows/sync-back-to-dev.yml b/.github/workflows/sync-back-to-dev.yml index fb0e8314..28dd1b54 100644 --- a/.github/workflows/sync-back-to-dev.yml +++ b/.github/workflows/sync-back-to-dev.yml @@ -13,6 +13,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Opening pull request - run: gh pr create -B dev -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal' + run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-and-build-v6.yml b/.github/workflows/test-and-build-v6.yml deleted file mode 100644 index 09d2ddeb..00000000 --- a/.github/workflows/test-and-build-v6.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: Build and Publish (development-v6) -on: - schedule: - - cron: "0 5 * * *" - push: - branches: - - development-v6 - -env: - dockerhub: ${{ secrets.DOCKERHUB_NAMESPACE }}/pihole - ghcr: ghcr.io/${{ github.repository_owner }}/pihole - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - platform: [linux/amd64, linux/386, linux/arm/v6, linux/arm/v7, linux/arm64] - alpine_version: [3.19] - include: - - platform: linux/riscv64 - alpine_version: edge - - steps: - - name: Prepare name for digest up/download - run: | - platform=${{ matrix.platform }} - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: development-v6 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - images: | - ${{ env.dockerhub }} - ${{ env.ghcr }} - flavor: | - latest=false - tags: | - development-v6 - - - name: Login to DockerHub and GitHub Container Registry - uses: ./.github/actions/login-repo - with: - docker_username: ${{ secrets.DOCKERHUB_USER }} - docker_password: ${{ secrets.DOCKERHUB_PASS }} - ghcr_username: ${{ github.repository_owner }} - ghcr_password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: ${{ matrix.platform}} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build container and push by digest - id: build - uses: docker/build-push-action@v6 - with: - context: ./src/ - platforms: ${{ matrix.platform }} - build-args: | - PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }} - alpine_version=${{ matrix.alpine_version }} - labels: ${{ steps.meta.outputs.labels }} - outputs: | - type=image,name=${{ env.dockerhub }},push-by-digest=true,name-canonical=true,push=true - - - name: Export digests - run: | - mkdir -p /tmp/digests - digest_docker="${{ steps.build.outputs.digest }}" - touch "/tmp/digests/${digest_docker#sha256:}" - - - name: Upload digest - uses: actions/upload-artifact@v4 - with: - name: digests-${{ env.PLATFORM_PAIR }} - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 - - # Merge all the digests into a single file - # If we would push immediately above, the individual runners would overwrite each other's images - # https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners - merge-and-deploy: - runs-on: ubuntu-latest - needs: - - build - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: development-v6 - - - name: Download digests - uses: actions/download-artifact@v4 - with: - path: /tmp/digests - pattern: digests-* - merge-multiple: true - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - images: | - ${{ env.dockerhub }} - ${{ env.ghcr }} - flavor: | - latest=false - tags: | - development-v6 - - - name: Login to DockerHub and GitHub Container Registry - uses: ./.github/actions/login-repo - with: - docker_username: ${{ secrets.DOCKERHUB_USER }} - docker_password: ${{ secrets.DOCKERHUB_PASS }} - ghcr_username: ${{ github.repository_owner }} - ghcr_password: ${{ secrets.GITHUB_TOKEN }} - - - name: Create manifest list and push (DockerHub and GitHub Container Registry) - working-directory: /tmp/digests - run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.dockerhub }}@sha256:%s ' *) - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.ghcr }}@sha256:%s ' *) - - - name: Inspect images - run: | - docker buildx imagetools inspect ${{ env.dockerhub }}:${{ steps.meta.outputs.version }} - docker buildx imagetools inspect ${{ env.ghcr }}:${{ steps.meta.outputs.version }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4bcb67f7..81bcc83e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,8 +2,8 @@ Please review the following before opening a pull request (PR) to help your PR go smoothly: -* Code changes go to the `dev` branch first - * To ensure proper testing and quality control, target any code change pull requests against `dev` branch. +* Code changes go to the `development` branch first + * To ensure proper testing and quality control, target any code change pull requests against `development` branch. * Make sure the tests pass * Take a look at [TESTING.md](test/TESTING.md) to see how to run tests locally so you do not have to push all your code to a PR and have GitHub Actions run it. diff --git a/README.md b/README.md index 5167a689..85005009 100644 --- a/README.md +++ b/README.md @@ -175,9 +175,9 @@ The Date-based (including incremented "Patch" versions) do not relate to any kin | `latest` | Always latest release | | `2022.04.0` | Date-based release | | `2022.04.1` | Second release in a given month | -| `dev` | Similar to `latest`, but for the development branch (pushed occasionally) | +| `development` | Similar to `latest`, but for the development branch (pushed occasionally) | | `*beta` | Early beta releases of upcoming versions - here be dragons | -| `nightly` | Like `dev` but pushed every night and pulls from the latest `development` branches of the core Pi-hole components (Pi-hole, web, FTL) | +| `nightly` | Like `development` but pushed every night and pulls from the latest `development` branches of the core Pi-hole components (Pi-hole, web, FTL) | ## Upgrading, Persistence, and Customizations diff --git a/src/Dockerfile b/src/Dockerfile index 373f7828..f822bfd6 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -5,11 +5,11 @@ FROM alpine:${alpine_version} AS base # https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope ARG TARGETPLATFORM -ARG WEB_BRANCH="development-v6" -ARG CORE_BRANCH="development-v6" -ARG FTL_BRANCH="development-v6" +ARG WEB_BRANCH="development" +ARG CORE_BRANCH="development" +ARG FTL_BRANCH="development" ARG PIHOLE_DOCKER_TAG="dev-localbuild" -ARG PADD_BRANCH="PADD_FTLv6" +ARG PADD_BRANCH="development" ENV DNSMASQ_USER=pihole ENV FTL_CMD=no-daemon