Code Monkey home page Code Monkey logo

Comments (4)

mzuehlke avatar mzuehlke commented on July 29, 2024 1

That was my misunderstanding. That the branch names for pull_request are about the target branch 🤦

from sbt-github-actions.

armanbilge avatar armanbilge commented on July 29, 2024

This issue is here:

on:
pull_request:
branches: ['**']
push:
branches: ['**']
tags: [v*]

If you don't want CI to run on pushes to certain branches, you can modify that setting.

from sbt-github-actions.

mzuehlke avatar mzuehlke commented on July 29, 2024
   pull_request: 
     branches: ['**'] 
   push: 
     branches: ['main'] 
     tags: [v*] 

Took me a bit 😄 This has (nearly) the same effect as my approach above.
Only disadvantage is that CI only runs after you open the pull-request.

But you can not specify different branches for pull_request and for push 😢 So this is not possible.

on:
pull_request:
branches: [${branches.map(wrap).mkString(", ")}]$renderedTypes$renderedPaths
push:
branches: [${branches.map(wrap).mkString(", ")}]$renderedTags$renderedPaths

from sbt-github-actions.

armanbilge avatar armanbilge commented on July 29, 2024

Oh I see, you want a complex rule that only runs CI for the branch if there isn't an existing PR for that branch?

But you can not specify different branches for pull_request and for push 😢 So this is not possible.

Why do you need different values for there? If you don't want to run CI on a branch, I'm guessing you don't want CI for PRs targeting that branch either? PRs from that branch to your main branch will still have CI of course.

from sbt-github-actions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.