Skip to content

Commit f96fddd

Browse files
authored
Merge pull request #1633 from pi-hole/sort-master-scheduled-build
[Housekeeping] Bring build script across from development
2 parents d4dd6b0 + bd54136 commit f96fddd

File tree

3 files changed

+34
-125
lines changed

3 files changed

+34
-125
lines changed

.github/dependabot.yml

+3-32
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
30-
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
29+
target-branch: development
5930
reviewers:
6031
- "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/test-and-build.yaml

-84
This file was deleted.

0 commit comments

Comments
 (0)