Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File changes on first commit of new branch #98

Closed
mike-potter opened this issue Jul 20, 2021 · 1 comment
Closed

File changes on first commit of new branch #98

mike-potter opened this issue Jul 20, 2021 · 1 comment

Comments

@mike-potter
Copy link

When setting the base to the name of the current branch, it works correctly on future commits. But the first time the job runs (no commit since branch created) none of the files are detected as being changed.

I need a way to run a job the first time a new branch is pushed, or if certain files in the branch have changed. Can this be done?

(I can potentially do this in the latest jobs when I look for the changed output potentially, but wanted to check if I was missing something)

@mike-potter
Copy link
Author

Nevermind, I think it's actually working fine. I had a bad conditional:

if: ${{ github.event.push }}

That came from some example copy/paste somewhere. I changed it to:

if: ${{ github.event_name == 'push' }}

and now it seems to work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant