Skip to content

Commit b7ac062

Browse files
josecarlospeer-cloudjorge07
authored andcommitted
fix(ci): make Docker Hub login optional in release workflow (fork-friendly)
1 parent 05f8bd5 commit b7ac062

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/release.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
env:
2121
VERSION: ${{ matrix.version }}
2222
ARCHS: ${{ matrix.arch }}
23+
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
2324
name: release-${{ matrix.version }}
2425
runs-on: ubuntu-latest
2526
steps:
@@ -32,8 +33,14 @@ jobs:
3233
id: buildx
3334
uses: docker/setup-buildx-action@v3
3435
- name: Login to Docker Hub
36+
if: env.REGISTRY_USERNAME != ''
3537
uses: docker/login-action@v3
3638
with:
3739
username: ${{ secrets.REGISTRY_USERNAME }}
3840
password: ${{ secrets.REGISTRY_PASSWORD }}
39-
- run: make release
41+
- name: Build and push
42+
if: env.REGISTRY_USERNAME != ''
43+
run: make release
44+
- name: Build only (no push credentials)
45+
if: env.REGISTRY_USERNAME == ''
46+
run: make build

0 commit comments

Comments
 (0)