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

[draft] ci: fix duplicate jobs #48

Merged
merged 12 commits into from
Oct 14, 2024
Merged

[draft] ci: fix duplicate jobs #48

merged 12 commits into from
Oct 14, 2024

Conversation

davmacario
Copy link
Member

@davmacario davmacario commented Oct 7, 2024

Closes #47

πŸ“‘ Description

  • Prevent duplicate jobs - now Super Linter is only ran on pull requests
  • Create new job to build and push Depthai Docker image to the GitHub Container Registry

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

β„Ή Additional Information

The PR is still in draft, as I am trying to find a way to test the new job (I am accepting suggestions).

I also would like to trigger the action when, either:

  • The files Dockerfile, requirements.txt and vision_webserver.py are changed when pushing (or merging) to main
  • The file defining the job is changed regardless of the branch

but it does not seem to be possible (as I can only define the push trigger once). If there was a way to do so, it would also be possible to test this job without having to merge to main first.

@davmacario davmacario added the enhancement New feature or request label Oct 7, 2024
@davmacario davmacario requested a review from gmacario October 7, 2024 21:45
@davmacario davmacario self-assigned this Oct 7, 2024
@davmacario davmacario marked this pull request as draft October 7, 2024 21:46
@davmacario
Copy link
Member Author

@gmacario I am open to suggestions :)

@gmacario
Copy link
Member

@gmacario I am open to suggestions :)

Maybe reading the examples at https://github.com/super-linter/super-linter could help

@gmacario
Copy link
Member

Concerning

I also would like to trigger the action when, either:
...

I am quite sure you are familiar with https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow, aren't you?

@davmacario
Copy link
Member Author

davmacario commented Oct 14, 2024

I am quite sure you are familiar with https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow, aren't you?

I am now, and the documentation for the workflow_dispatch flag clearly says:

Note: This event will only trigger a workflow run if the workflow file is on the default branch.

Indeed, despite having pushed changes that add the workflow_dispatch condition, I am not able to manually trigger the action as it is not on the default branch.

@gmacario
Copy link
Member

gmacario commented Oct 14, 2024

@davmacario Re:

  • Create new job to build and push Depthai Docker image to the GitHub Container Registry (to be tested)

Although this feature is quite welcome, I would suggest to handle that in a separate PR since it is not related to bug #47 which this PR is supposed to fix

@davmacario davmacario marked this pull request as ready for review October 14, 2024 18:41
@davmacario
Copy link
Member Author

@gmacario should work now

Copy link
Member

@gmacario gmacario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the caveat which I mentioned in #48 (comment)

@davmacario Re:

  • Create new job to build and push Depthai Docker image to the GitHub Container Registry (to be tested)

Although this feature is quite welcome, I would suggest to handle that in a separate PR since it is not related to bug #47 which this PR is supposed to fix

LGTM. Merging PR

@gmacario gmacario merged commit 810bc69 into main Oct 14, 2024
3 checks passed
@gmacario gmacario deleted the ci/fix-duplicate-jobs branch October 14, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: ci: duplicate runs of the same jobs
2 participants