Skip to content

Commit

Permalink
only run update readme job on push events.
Browse files Browse the repository at this point in the history
  • Loading branch information
khajavi committed Mar 25, 2023
1 parent a25c31c commit 55e5c6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ jobs:
fetch-depth: '0'
- name: Test
run: sbt ${{ matrix.scala-project }}/test
generate-readme:
name: Generate README
update-readme:
name: Update README
runs-on: ubuntu-latest
continue-on-error: false
if: ${{ (github.event_name == 'push') || ((github.event_name == 'release') && (github.event.action == 'published')) }}
if: ${{ github.event_name == 'push' }}
steps:
- name: Git Checkout
uses: actions/[email protected]
Expand Down
10 changes: 3 additions & 7 deletions zio-sbt-ci/src/main/scala/zio/sbt/ZioSbtCiPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,9 @@ object ZioSbtCiPlugin extends AutoPlugin {

Seq(
Job(
id = "generate-readme",
name = "Generate README",
condition = updateReadmeCondition orElse Some(
Condition.Expression("github.event_name == 'push'") ||
Condition.Expression("github.event_name == 'release'") &&
Condition.Expression("github.event.action == 'published'")
),
id = "update-readme",
name = "Update README",
condition = updateReadmeCondition orElse Some(Condition.Expression("github.event_name == 'push'")),
steps = (if (swapSizeGB > 0) Seq(setSwapSpace) else Seq.empty) ++
Seq(
checkout,
Expand Down

0 comments on commit 55e5c6b

Please sign in to comment.