https://pantsbuild.org/ logo
#general
Title
# general
g

glamorous-nail-59544

01/05/2023, 3:28 PM
Hey folks, what is your strategy (or recommend) for using
--changed-since=
in github actions when the same Test-Build workflow is triggered for both PRs and Push events?
I think
${{ github.event.pull_request.base.sha || github.event.before}}
is doing the job required
f

faint-dress-64989

01/06/2023, 3:41 AM
Do you mind sharing the pants command in github actions your running after push? I'm wanting to do something similar where after a PR has finished on merge I want to run pants commands on the changed artifacts only
I don't think
./pants --changed-since=${{ github.event.before }} publish
will work for the target selection though
nvm
that seems to work
g

glamorous-nail-59544

01/06/2023, 7:29 AM
@faint-dress-64989 if you are working on PRs then you might need to consider
github.event.pull_request.base.sha
as well to diff against your
main
branch instead
definitely not for publish thou, but it can speedup tests and checks a lot
f

faint-dress-64989

01/06/2023, 3:26 PM
Thanks! I should add that to my PR work flow