fix(ci): use env context for secrets check in step if-condition

Step-level 'if' cannot reference 'secrets' directly. Expose the
secret via an env var and check that instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pepijn
2026-04-09 15:27:02 +02:00
parent 14f1e09f22
commit e72b168f28
+6 -2
View File
@@ -86,7 +86,9 @@ jobs:
# Authenticate to Docker Hub to avoid anonymous pull rate limits
# (100 pulls/6h anonymous vs 200 pulls/6h authenticated).
- name: Login to Docker Hub
if: ${{ secrets.DOCKERHUB_LEROBOT_USERNAME != '' }}
if: env.DOCKERHUB_LEROBOT_USERNAME != ''
env:
DOCKERHUB_LEROBOT_USERNAME: ${{ secrets.DOCKERHUB_LEROBOT_USERNAME }}
uses: docker/login-action@v3 # zizmor: ignore[unpinned-uses]
with:
username: ${{ secrets.DOCKERHUB_LEROBOT_USERNAME }}
@@ -250,7 +252,9 @@ jobs:
cache-binary: false
- name: Login to Docker Hub
if: ${{ secrets.DOCKERHUB_LEROBOT_USERNAME != '' }}
if: env.DOCKERHUB_LEROBOT_USERNAME != ''
env:
DOCKERHUB_LEROBOT_USERNAME: ${{ secrets.DOCKERHUB_LEROBOT_USERNAME }}
uses: docker/login-action@v3 # zizmor: ignore[unpinned-uses]
with:
username: ${{ secrets.DOCKERHUB_LEROBOT_USERNAME }}