Skip to content

Commit

Permalink
remove old build scripts from master (we wont use them again) and bri…
Browse files Browse the repository at this point in the history
…ng accross the v6 one so that the nightly image is built using the correct branches

Signed-off-by: Adam Warner <[email protected]>
  • Loading branch information
PromoFaux committed Sep 2, 2024
1 parent d4dd6b0 commit fa5344e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 93 deletions.
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.

0 comments on commit fa5344e

Please sign in to comment.