diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index ec56d426ce1..dbd48976fe8 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -46,6 +46,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub + if: github.event_name == 'push' uses: docker/login-action@v3 with: username: xhofe @@ -57,7 +58,7 @@ jobs: with: context: . file: Dockerfile.ci - push: true + push: ${{ github.event_name == 'push' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x @@ -67,7 +68,7 @@ jobs: uses: docker/build-push-action@v5 with: file: Dockerfile.ffmpeg - push: true + push: ${{ github.event_name == 'push' }} tags: ${{ steps.meta-ffmpeg.outputs.tags }} labels: ${{ steps.meta-ffmpeg.outputs.labels }} platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x diff --git a/.github/workflows/del-pr-docker.yml b/.github/workflows/del-pr-docker.yml deleted file mode 100644 index 82ae69cf894..00000000000 --- a/.github/workflows/del-pr-docker.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: delete closed pr docker tag - -on: - pull_request: - types: [closed] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - del_docker_tag: - name: Build Docker - runs-on: ubuntu-latest - steps: - - - name: Delete docker tag - id: del_docker_tag - uses: xhofe/del-docker-tag@main - with: - username: xhofe - password: ${{ secrets.DOCKERHUB_TOKEN }} - # token: ${{ secrets.DOCKER_TOKEN }} - tags: xhofe/alist:pr-${{ github.event.pull_request.number }},xhofe/alist:pr-${{ github.event.pull_request.number }}-ffmpeg \ No newline at end of file