diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6015efa0..c372bb05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -123,9 +123,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: | - name=${{ github.repository }},enable=${{ github.event.repository.fork == false }} - ghcr.io/${{ github.repository }} + images: ghcr.io/${{ github.repository }} tags: | type=ref,event=branch type=semver,pattern={{version}},enable=false @@ -137,15 +135,8 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - 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 == 'push' + if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: registry: ghcr.io @@ -180,9 +171,7 @@ jobs: id: meta-hw uses: docker/metadata-action@v5 with: - images: | - name=${{ github.repository }},enable=${{ github.event.repository.fork == false }} - ghcr.io/${{ github.repository }} + images: ghcr.io/${{ github.repository }} flavor: | suffix=-hardware,onlatest=true latest=auto @@ -197,15 +186,8 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - 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 == 'push' + if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: registry: ghcr.io @@ -235,9 +217,7 @@ jobs: id: meta-rk uses: docker/metadata-action@v5 with: - images: | - name=${{ github.repository }},enable=${{ github.event.repository.fork == false }} - ghcr.io/${{ github.repository }} + images: ghcr.io/${{ github.repository }} flavor: | suffix=-rockchip,onlatest=true latest=auto @@ -252,15 +232,8 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - 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 == 'push' + if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: registry: ghcr.io