From 7016f517a33fa6074efaa3930344227e94fac488 Mon Sep 17 00:00:00 2001 From: beevelop <6891349+beevelop@users.noreply.github.com> Date: Wed, 28 Oct 2026 10:56:30 +0000 Subject: [PATCH] Fix Docker publishing for pull request pipelines Run pull requests as build-only checks and restrict push-triggered publishing to the latest branch and release tags. Skip Docker Hub login on pull_request events. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/docker.yml | 5 +++-- README.md | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5c9fcd9..5ad24e0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,8 +3,9 @@ name: Docker Image on: schedule: - cron: "0 12 * * *" # everyday at 12pm + pull_request: push: - branches: ["**"] + branches: ["latest"] tags: ["v*.*.*"] env: @@ -33,6 +34,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 - name: Login to Docker Hub + if: ${{ github.event_name != 'pull_request' }} uses: docker/login-action@v4.6.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -45,4 +47,3 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} - diff --git a/README.md b/README.md index 96773e6..e1d0c72 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ docker build -t beevelop/ionic github.com/beevelop/docker-ionic FROM beevelop/ionic:v2025.08.1 ``` +## CI + +Pull requests build the Docker image without logging in to Docker Hub or pushing +images. Pushes to `latest`, version tags matching `v*.*.*`, and scheduled runs log +in and publish images. + --- # All Docker images