From 216a029a59e82ef86140e52de62837bbae43adcc Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Wed, 8 May 2024 19:22:03 +0200 Subject: [PATCH] push to DH on tag and release --- .github/workflows/build-docker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index af5547231c..76b3cda392 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -4,6 +4,7 @@ on: workflow_dispatch: # In case a repo contributor needs a specific docker tag built. push: tags: ['v*.*.*'] + branches: [main] release: # Release logic: # https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=unpublished#release @@ -56,7 +57,7 @@ jobs: with: images: | ghcr.io/centrifuge/centrifuge-chain - ${{ github.event_name != 'pull_request' && 'centrifugeio/centrifuge-chain' || ''}} + ${{ (github.event_name == 'release' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))) && 'centrifugeio/centrifuge-chain' || ''}} # TAGS: # v.X.Y.Z when pushing a git tag (or a release) # latest when triggered by a release