mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-20 02:18:51 +00:00
Set the flavor and tags in the metadata base on the current build yaml for v5 namely:
- schedule = nightly - latest = only on tag/publish - else branch name (on dev) Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
24
.github/workflows/build-and-publish.yml
vendored
24
.github/workflows/build-and-publish.yml
vendored
@@ -2,6 +2,11 @@ name: Build Image and Publish
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
|
||||
env:
|
||||
@@ -27,8 +32,15 @@ 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: dev
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
@@ -38,9 +50,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
|
||||
@@ -115,9 +129,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
|
||||
|
||||
Reference in New Issue
Block a user