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

Only trigger cd when ci is successful #35

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tbkr
Copy link
Collaborator

@tbkr tbkr commented Nov 8, 2024

  • Push project to pypi only if ci is succeeding

This is now relying on https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_run as well as pushed tags.

So the push to pypi is only triggered in case the ci was successful in the first place.

@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.77%. Comparing base (0d6c2a4) to head (6167ee0).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #35   +/-   ##
========================================
  Coverage    94.77%   94.77%           
========================================
  Files            3        3           
  Lines          134      134           
========================================
  Hits           127      127           
  Misses           7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@TomHodson TomHodson left a comment

Choose a reason for hiding this comment

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

It wouldn't hurt to merge this and test it but I suspect that you will need to remove the lines

  push:
    tags:
      - "**"

otherwise it may trigger the workflow both on push and when the CI completes.

- Push project to pypi only if ci is succeeding
@tbkr tbkr force-pushed the feature/github-action-ci-cd-dependcy branch from ea02d46 to 6167ee0 Compare November 8, 2024 12:19
@tbkr
Copy link
Collaborator Author

tbkr commented Nov 8, 2024

I integrated the cd step into the ci workflow because I can rely on the results of the former stages there. Added the filtering for tags as well, because otherwise a new artifact will be pushed to pypi for each run of the ci.

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

Successfully merging this pull request may close these issues.

3 participants