Skip to content

workaround: publish docker image by pushing on development branch - #1905

Closed
LizenzFass78851 wants to merge 1 commit into
pi-hole:developmentfrom
LizenzFass78851:fix/docker-build-and-publish
Closed

workaround: publish docker image by pushing on development branch#1905
LizenzFass78851 wants to merge 1 commit into
pi-hole:developmentfrom
LizenzFass78851:fix/docker-build-and-publish

Conversation

@LizenzFass78851

Copy link
Copy Markdown
Contributor

Description

This adds the variable components branch so that if github.ref_name is recognized as development, it also pushing the docker image to the development tag

Motivation and Context

In one of the last workflow runs that was triggered by pushing on the development branch, an error occurred that was triggered when the Docker image was built and not the development branch of FTL, Web and Core was loaded, but rather the respective master branch.
https://github.com/pi-hole/docker-pi-hole/actions/runs/18255584741/job/51976380837#step:10:399

How Has This Been Tested?

I tested the workflow with deviations in my fork with the changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@LizenzFass78851
LizenzFass78851 requested a review from a team as a code owner October 5, 2025 12:42

@yubiuser yubiuser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this. It fails, because it tries to add a file to the image that is not part of core's master branch yet.

I'm undecided yet regarding this PR. It will alter how we tag things. Currently, nightly contains development branch of all components and the docker repo. development uses the master branches of the components, but the development branch of this repo.
With this change, development will be like nightly

@PromoFaux

Copy link
Copy Markdown
Member

That's a good point - the development tag should include all the actual released components (hence master branch override) and only include docker-specific dev changes. Of course, that's how we have ended up in this situation - the file structure of the core repo has changed in development, and has not yet been released to master.

One pottential workaround until such time as we can release is to add the following patch to this repo's development branch:

diff --git a/build.sh b/build.sh
old mode 100755
new mode 100644
diff --git a/src/Dockerfile b/src/Dockerfile
index cb7a061..49375e9 100644
--- a/src/Dockerfile
+++ b/src/Dockerfile
@@ -90,8 +90,12 @@ RUN cd /etc/.pihole && \
     install -Dm755 -d /var/log/pihole && \
     install -Dm755 -d /var/lib/logrotate && \
     install -Dm755 -t /usr/local/bin pihole && \
-    install -Dm644 ./advanced/bash-completion/pihole.bash /etc/bash_completion.d/pihole && \
-    install -Dm644 ./advanced/bash-completion/pihole-ftl.bash /etc/bash_completion.d/pihole-FTL && \
+    (if [ -f ./advanced/bash-completion/pihole.bash ]; then \
+        install -Dm644 ./advanced/bash-completion/pihole.bash /etc/bash_completion.d/pihole; \
+        install -Dm644 ./advanced/bash-completion/pihole-ftl.bash /etc/bash_completion.d/pihole-FTL; \
+    else \
+        install -Dm644 ./advanced/bash-completion/pihole /etc/bash_completion.d/pihole; \
+    fi) && \
     install -T -m 0755 ./advanced/Templates/pihole-FTL-prestart.sh /opt/pihole/pihole-FTL-prestart.sh && \
     install -T -m 0755 ./advanced/Templates/pihole-FTL-poststop.sh /opt/pihole/pihole-FTL-poststop.sh && \
     addgroup -S pihole -g ${PIHOLE_GID} && adduser -S pihole -G pihole -u ${PIHOLE_UID} && \

Signed-off-by: LizenzFass78851 <82592556+LizenzFass78851@users.noreply.github.com>
@LizenzFass78851 LizenzFass78851 changed the title fix: publish docker image by pushing on development branch workaround: publish docker image by pushing on development branch Oct 5, 2025
@LizenzFass78851

Copy link
Copy Markdown
Contributor Author

I applied the patch and removed the change that was intended for the GitHub workflow.

@LizenzFass78851

Copy link
Copy Markdown
Contributor Author

closed, as implementation is continued in pull request #1906

@LizenzFass78851
LizenzFass78851 deleted the fix/docker-build-and-publish branch October 7, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants