From 9e53c0f8e22adf6031428e01e72b9e063c19ff86 Mon Sep 17 00:00:00 2001 From: Luis Garcia Date: Fri, 11 Jul 2025 10:32:52 -0600 Subject: [PATCH] CI: Simplify docker build push Signed-off-by: Luis Garcia --- .github/workflows/ci.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a3b99f..92968f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v6 - name: "Set up Python" uses: actions/setup-python@v5 @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v6 - name: "Set up Python" uses: actions/setup-python@v5 @@ -172,6 +172,7 @@ jobs: env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} if: "${{ env.DOCKER_USERNAME != '' }}" + id: docker_login uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -185,26 +186,14 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build - id: build - if: "${{ steps.docker_meta.outputs.tags == '' }}" - uses: docker/build-push-action@v5 - with: - context: . - file: ${{ matrix.dockerfile }} - platforms: linux/amd64,linux/arm64 - push: false - tags: jellyplex-watched:action - - name: Build Push id: build_push - if: "${{ steps.docker_meta.outputs.tags != '' }}" - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . file: ${{ matrix.dockerfile }} platforms: linux/amd64,linux/arm64 - push: true + push: ${{ steps.docker_login.outcome == 'success' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }}