From 0e0e0e47c318ac454c6faac53a6893d7daa8134b Mon Sep 17 00:00:00 2001 From: Stephen Lang Date: Tue, 3 Mar 2026 18:37:21 +0000 Subject: [PATCH] ci: skip Docker Hub login when credentials unavailable Add conditional step to skip Docker Hub login in test workflows when the DOCKER_TOKEN_EBPF_INSTRUMENTATION secret is not available. This prevents workflows from failing on fork PRs, Dependabot/Renovate PRs, and other contexts where repository secrets are not accessible, while preserving login for rate limit avoidance when credentials are available. --- .github/workflows/pull_request_integration_tests.yml | 1 + .github/workflows/pull_request_integration_tests_arm.yml | 1 + .github/workflows/pull_request_k8s_integration_tests.yml | 1 + .github/workflows/pull_request_oats_test.yml | 1 + .github/workflows/workflow_integration_tests_vm.yml | 1 + 5 files changed, 5 insertions(+) diff --git a/.github/workflows/pull_request_integration_tests.yml b/.github/workflows/pull_request_integration_tests.yml index cc22b9c271..d41c99eee4 100644 --- a/.github/workflows/pull_request_integration_tests.yml +++ b/.github/workflows/pull_request_integration_tests.yml @@ -114,6 +114,7 @@ jobs: persist-credentials: false - name: Log in to Docker Hub + if: secrets.DOCKER_TOKEN_EBPF_INSTRUMENTATION != '' uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: username: ${{ vars.DOCKER_USERNAME }} diff --git a/.github/workflows/pull_request_integration_tests_arm.yml b/.github/workflows/pull_request_integration_tests_arm.yml index 531daa0ee0..fdfa2f915a 100644 --- a/.github/workflows/pull_request_integration_tests_arm.yml +++ b/.github/workflows/pull_request_integration_tests_arm.yml @@ -120,6 +120,7 @@ jobs: persist-credentials: false - name: Log in to Docker Hub + if: secrets.DOCKER_TOKEN_EBPF_INSTRUMENTATION != '' uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: username: ${{ vars.DOCKER_USERNAME }} diff --git a/.github/workflows/pull_request_k8s_integration_tests.yml b/.github/workflows/pull_request_k8s_integration_tests.yml index bc91e19001..eb4c8ded7a 100644 --- a/.github/workflows/pull_request_k8s_integration_tests.yml +++ b/.github/workflows/pull_request_k8s_integration_tests.yml @@ -112,6 +112,7 @@ jobs: persist-credentials: false - name: Log in to Docker Hub + if: secrets.DOCKER_TOKEN_EBPF_INSTRUMENTATION != '' uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: username: ${{ vars.DOCKER_USERNAME }} diff --git a/.github/workflows/pull_request_oats_test.yml b/.github/workflows/pull_request_oats_test.yml index 7a77d9a788..cf509f6ec4 100644 --- a/.github/workflows/pull_request_oats_test.yml +++ b/.github/workflows/pull_request_oats_test.yml @@ -112,6 +112,7 @@ jobs: persist-credentials: false - name: Log in to Docker Hub + if: secrets.DOCKER_TOKEN_EBPF_INSTRUMENTATION != '' uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: username: ${{ vars.DOCKER_USERNAME }} diff --git a/.github/workflows/workflow_integration_tests_vm.yml b/.github/workflows/workflow_integration_tests_vm.yml index d08489cd57..2ad0ae844c 100644 --- a/.github/workflows/workflow_integration_tests_vm.yml +++ b/.github/workflows/workflow_integration_tests_vm.yml @@ -122,6 +122,7 @@ jobs: persist-credentials: false - name: Log in to Docker Hub + if: secrets.DOCKER_TOKEN_EBPF_INSTRUMENTATION != '' uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: username: ${{ vars.DOCKER_USERNAME }}