Skip to content

Commit 6323723

Browse files
committed
fix unit test workflow for forks
1 parent c893196 commit 6323723

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
unitTests:
88
name: "🧪 Unit Tests"
99
runs-on: ubuntu-latest
10+
env:
11+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
1012
steps:
1113
- name: 🔧 Disable IPv6
1214
run: |
@@ -52,10 +54,14 @@ jobs:
5254

5355
# ..to avoid rate limits when pulling images
5456
- name: 🐳 Login to DockerHub
57+
if: ${{ env.DOCKERHUB_USERNAME }}
5558
uses: docker/login-action@v3
5659
with:
5760
username: ${{ secrets.DOCKERHUB_USERNAME }}
5861
password: ${{ secrets.DOCKERHUB_TOKEN }}
62+
- name: 🐳 Skipping DockerHub login (no secrets available)
63+
if: ${{ !env.DOCKERHUB_USERNAME }}
64+
run: echo "DockerHub login skipped because secrets are not available."
5965

6066
- name: 📥 Download deps
6167
run: pnpm install --frozen-lockfile

0 commit comments

Comments
 (0)