Skip to content

Commit c38a6ea

Browse files
authored
Merge pull request #1626 from pi-hole/development-v6
Development v6 -> dev
2 parents 6239412 + d00f17f commit c38a6ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+851
-2539
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
`{Please select 'base: dev' as target branch above! (you can delete this line)}`
1+
`{Please select 'base: development' as target branch above! (you can delete this line)}`
22

33
<!--- Provide a general summary of your changes in the Title above -->
44

.github/actions/login-repo/action.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Login to container registries
2+
description: Login to container registries Docker Hub and GitHub Container Registry
3+
4+
inputs:
5+
# Actions cannot access secrets so pass them in as inputs
6+
docker_username:
7+
required: true
8+
description: The username to use to login to Docker Hub
9+
docker_password:
10+
required: true
11+
description: The password to use to login to Docker Hub
12+
ghcr_username:
13+
required: true
14+
description: The username to use to login to GitHub Container Registry
15+
ghcr_password:
16+
required: true
17+
description: The password to use to login to GitHub Container Registry
18+
19+
runs:
20+
using: "composite"
21+
steps:
22+
-
23+
name: Login to Docker Hub
24+
uses: docker/login-action@v2
25+
with:
26+
registry: docker.io
27+
username: ${{ inputs.docker_username }}
28+
password: ${{ inputs.docker_password }}
29+
-
30+
name: Login to GitHub Container Registry
31+
uses: docker/login-action@v2
32+
with:
33+
registry: ghcr.io
34+
username: ${{ inputs.ghcr_username }}
35+
password: ${{ inputs.ghcr_password }}

.github/dependabot.yml

+4-33
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ updates:
77
interval: "weekly"
88
day: saturday
99
time: "10:00"
10-
target-branch: dev
10+
target-branch: development
1111
reviewers:
1212
- "pi-hole/docker-maintainers"
1313
- package-ecosystem: "docker"
@@ -16,7 +16,7 @@ updates:
1616
interval: "weekly"
1717
day: saturday
1818
time: "10:00"
19-
target-branch: dev
19+
target-branch: development
2020
reviewers:
2121
- "pi-hole/docker-maintainers"
2222
- package-ecosystem: pip
@@ -26,35 +26,6 @@ updates:
2626
day: saturday
2727
time: "10:00"
2828
open-pull-requests-limit: 10
29-
target-branch: dev
29+
target-branch: development
3030
reviewers:
31-
- "pi-hole/docker-maintainers"
32-
# Maintain dependencies for GitHub Actions development-v6
33-
- package-ecosystem: "github-actions"
34-
directory: "/"
35-
schedule:
36-
interval: "weekly"
37-
day: saturday
38-
time: "10:00"
39-
target-branch: development-v6
40-
reviewers:
41-
- "pi-hole/docker-maintainers"
42-
- package-ecosystem: "docker"
43-
directory: "/src/"
44-
schedule:
45-
interval: "weekly"
46-
day: saturday
47-
time: "10:00"
48-
target-branch: development-v6
49-
reviewers:
50-
- "pi-hole/docker-maintainers"
51-
- package-ecosystem: pip
52-
directory: "/test"
53-
schedule:
54-
interval: weekly
55-
day: saturday
56-
time: "10:00"
57-
open-pull-requests-limit: 10
58-
target-branch: development-v6
59-
reviewers:
60-
- "pi-hole/docker-maintainers"
31+
- "pi-hole/docker-maintainers"

.github/workflows/test-and-build-v6.yml renamed to .github/workflows/build-and-publish.yml

+31-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
name: Build and Publish (development-v6)
1+
name: Build Image and Publish
22
on:
33
schedule:
44
- cron: "0 5 * * *"
55
push:
66
branches:
7-
- development-v6
7+
- development
8+
release:
9+
types: [published]
10+
811

912
env:
1013
dockerhub: ${{ secrets.DOCKERHUB_NAMESPACE }}/pihole
1114
ghcr: ghcr.io/${{ github.repository_owner }}/pihole
15+
components_branch: ${{ startsWith(github.ref, 'refs/tags/') && 'master' || 'development' }}
1216

1317
jobs:
1418
build:
@@ -29,9 +33,14 @@ jobs:
2933
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
3034
3135
- name: Checkout Repo
36+
if: github.event_name != 'schedule'
37+
uses: actions/checkout@v4
38+
39+
- name: Checkout dev branch if scheduled
40+
if: github.event_name == 'schedule'
3241
uses: actions/checkout@v4
3342
with:
34-
ref: development-v6
43+
ref: development
3544

3645
- name: Docker meta
3746
id: meta
@@ -42,9 +51,11 @@ jobs:
4251
${{ env.dockerhub }}
4352
${{ env.ghcr }}
4453
flavor: |
45-
latest=false
54+
latest=${{ startsWith(github.ref, 'refs/tags/') }}
4655
tags: |
47-
development-v6
56+
type=schedule,pattern=nightly
57+
type=ref,event=branch,enable=${{ github.event_name != 'schedule' }}
58+
type=ref,event=tag
4859
4960
- name: Login to DockerHub and GitHub Container Registry
5061
uses: ./.github/actions/login-repo
@@ -70,7 +81,11 @@ jobs:
7081
platforms: ${{ matrix.platform }}
7182
build-args: |
7283
PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }}
73-
alpine_version=${{ matrix.alpine_version }}
84+
alpine_version=${{ matrix.alpine_version }}
85+
FTL_BRANCH=${{ env.components_branch }}
86+
CORE_BRANCH=${{ env.components_branch }}
87+
WEB_BRANCH=${{ env.components_branch }}
88+
PADD_BRANCH=${{ env.components_branch }}
7489
labels: ${{ steps.meta.outputs.labels }}
7590
outputs: |
7691
type=image,name=${{ env.dockerhub }},push-by-digest=true,name-canonical=true,push=true
@@ -98,9 +113,14 @@ jobs:
98113
- build
99114
steps:
100115
- name: Checkout Repo
116+
if: github.event_name != 'schedule'
117+
uses: actions/checkout@v4
118+
119+
- name: Checkout dev branch if scheduled
120+
if: github.event_name == 'schedule'
101121
uses: actions/checkout@v4
102122
with:
103-
ref: development-v6
123+
ref: development
104124

105125
- name: Download digests
106126
uses: actions/download-artifact@v4
@@ -121,9 +141,11 @@ jobs:
121141
${{ env.dockerhub }}
122142
${{ env.ghcr }}
123143
flavor: |
124-
latest=false
144+
latest=${{ startsWith(github.ref, 'refs/tags/') }}
125145
tags: |
126-
development-v6
146+
type=schedule,pattern=nightly
147+
type=ref,event=branch,enable=${{ github.event_name != 'schedule' }}
148+
type=ref,event=tag
127149
128150
- name: Login to DockerHub and GitHub Container Registry
129151
uses: ./.github/actions/login-repo

.github/workflows/build-and-test.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Image and Test
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
# Official docker images for docker are only available for amd64 and arm64
12+
# TODO: Look at: https://github.com/docker-library/official-images#architectures-other-than-amd64
13+
# Is testing on all platforms really necessary?
14+
# 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
15+
#platform: [linux/amd64, linux/arm64]
16+
platform: [linux/amd64]
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v4
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v3
23+
with:
24+
platforms: ${{ matrix.platform }}
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Run Tests
30+
run: |
31+
echo "Building image to test"
32+
PLATFORM=${{ matrix.platform }} ./build-and-test.sh

.github/workflows/sync-back-to-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
- name: Opening pull request
16-
run: gh pr create -B dev -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
16+
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
1717
env:
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-and-build.yaml

-84
This file was deleted.

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ var-log/
1616

1717
# WIP/test stuff
1818
doco.yml
19+
20+
# Ignore FTL Binary if it exists
21+
src/pihole-FTL

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"github-actions.workflows.pinned.workflows": [
3+
".github/workflows/v6-alpine-play.yml"
4+
]
5+
}

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Please review the following before opening a pull request (PR) to help your PR go smoothly:
44

5-
* Code changes go to the `dev` branch first
6-
* To ensure proper testing and quality control, target any code change pull requests against `dev` branch.
5+
* Code changes go to the `development` branch first
6+
* To ensure proper testing and quality control, target any code change pull requests against `development` branch.
77

88
* Make sure the tests pass
99
* 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.

0 commit comments

Comments
 (0)