Skip to content

Commit

Permalink
Run publish step only on main repository
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbull committed Mar 4, 2024
1 parent 2acedfa commit f91b7c1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]

permissions:
contents: read
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f91b7c1

Please sign in to comment.