From 8a1694a9c3cd231ae22160f4e1dcb97ac28ace56 Mon Sep 17 00:00:00 2001 From: Amr Saber Date: Fri, 6 Sep 2024 04:03:04 +0100 Subject: [PATCH] Release when tests pass --- .github/workflows/push-docker-image.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push-docker-image.yaml b/.github/workflows/push-docker-image.yaml index 9c2bad3..1046900 100644 --- a/.github/workflows/push-docker-image.yaml +++ b/.github/workflows/push-docker-image.yaml @@ -1,9 +1,10 @@ name: Create and publish a Docker image on: - push: - branches: - - master + workflow_run: + workflows: [Run tests] + types: [completed] + branches: [master] env: REGISTRY: ghcr.io @@ -12,6 +13,7 @@ env: jobs: build-and-push-image: runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. permissions: