From acb13fec60c9dff877fe0048be49f4fa5e241a48 Mon Sep 17 00:00:00 2001 From: Tao Li Date: Fri, 30 Jan 2026 11:53:33 +0100 Subject: [PATCH] Push image to registry when ok-to-imag is set in PRs for testing --- .github/workflows/publish-docker.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index e58afbb..5ff6398 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -69,7 +69,8 @@ jobs: version: latest endpoint: builders # self-hosted - name: Login to GHCR - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' || + contains(github.event.pull_request.labels.*.name, 'ok-to-image') uses: docker/login-action@v3 with: registry: ghcr.io @@ -81,7 +82,8 @@ jobs: with: context: . platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || + contains(github.event.pull_request.labels.*.name, 'ok-to-image')}} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} target: ${{ matrix.image.target }}