From 0763254beabacbc5b9e0f959c44bea9f1b0dd020 Mon Sep 17 00:00:00 2001 From: Marko Kajzer Date: Mon, 9 Sep 2024 23:01:33 +0200 Subject: [PATCH] ci(deploy): only run when ci completes successfully --- .github/workflows/dockerhub.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 05cee97..2bb5039 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -1,20 +1,24 @@ -name: Build and upload Docker image +name: Deploy Docker image on: - push: + workflow_run: + workflows: + - ci branches: - main + types: + - completed jobs: buildx: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 + - id: buildx + uses: docker/setup-buildx-action@v3 - name: Build images env: