diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7950004d..390dd5c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,7 +124,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - ${{ github.repository }} + name=${{ github.repository }},enable=${{ github.event.repository.fork == false }} ghcr.io/${{ github.repository }} tags: | type=ref,event=branch @@ -138,14 +138,14 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: github.event_name != 'pull_request' + if: github.event_name == 'push' && github.event.repository.fork == false uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry - if: github.event_name != 'pull_request' + if: github.event_name == 'push' uses: docker/login-action@v3 with: registry: ghcr.io @@ -181,7 +181,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - ${{ github.repository }} + name=${{ github.repository }},enable=${{ github.event.repository.fork == false }} ghcr.io/${{ github.repository }} flavor: | suffix=-hardware,onlatest=true @@ -198,14 +198,14 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: github.event_name != 'pull_request' + if: github.event_name == 'push' && github.event.repository.fork == false uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Login to GitHub Container Registry - if: github.event_name != 'pull_request' + if: github.event_name == 'push' uses: docker/login-action@v3 with: registry: ghcr.io @@ -236,7 +236,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - ${{ github.repository }} + name=${{ github.repository }},enable=${{ github.event.repository.fork == false }} ghcr.io/${{ github.repository }} flavor: | suffix=-rockchip,onlatest=true @@ -253,14 +253,14 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: github.event_name != 'pull_request' + if: github.event_name == 'push' && github.event.repository.fork == false uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry - if: github.event_name != 'pull_request' + if: github.event_name == 'push' uses: docker/login-action@v3 with: registry: ghcr.io