Skip to content

[Housekeeping] Bring build script across from development #1633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 3 additions & 32 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -26,35 +26,6 @@ updates:
day: saturday
time: "10:00"
open-pull-requests-limit: 10
target-branch: dev
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
target-branch: development
reviewers:
- "pi-hole/docker-maintainers"
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -29,9 +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-v6
ref: development

- name: Docker meta
id: meta
Expand All @@ -42,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
Expand All @@ -70,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
Expand Down Expand Up @@ -98,9 +113,14 @@ 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-v6
ref: development

- name: Download digests
uses: actions/download-artifact@v4
Expand All @@ -121,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
Expand Down
84 changes: 0 additions & 84 deletions .github/workflows/test-and-build.yaml

This file was deleted.