From f91b7c1efa9f103b478351aee95addcca872bd84 Mon Sep 17 00:00:00 2001 From: Michael Bull Date: Mon, 4 Mar 2024 22:19:19 +0000 Subject: [PATCH] Run publish step only on main repository --- .github/workflows/ci.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d49bbf9..20e9210 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,10 +1,10 @@ name: CI on: - push: - branches: [ "master" ] pull_request: branches: [ "master" ] + push: + branches: [ "master" ] permissions: contents: read @@ -58,9 +58,8 @@ jobs: publish: name: Publish runs-on: ${{ matrix.os }} - + if: github.ref == 'refs/heads/master' && github.repository == 'michaelbull/kotlin-result' needs: build - if: github.ref == 'refs/heads/master' && github.event_name == 'push' && needs.build.result == 'success' strategy: matrix: