Lightning-AI / litdata

Transform datasets at scale. Optimize datasets for fast AI model training.
Apache License 2.0
298 stars 34 forks source link

GitHub actions triggering twice #220

Closed awaelchli closed 1 month ago

awaelchli commented 1 month ago

Probably a configuration issue. The CI triggers all jobs twice on a PR:

image

Example: https://github.com/Lightning-AI/litdata/pull/217

deependujha commented 1 month ago

But, one is for pull_request and the other is for push.

I guess, When your PR checks were running, the PR was merged and triggered a push CI action too.

deependujha commented 1 month ago

Sorry, I just observed this behavior. For a small nitpick fix, I coded on github and opened a PR.

In this case, it did run pull_request and push CI.

Screenshot from 2024-07-12 16-59-54

deependujha commented 1 month ago
# .github/workflows/ci-testing.yml

name: CI testing

on: # Trigger the workflow on push or pull request, but only for the main branch
  push: {}
  pull_request:
    branches: [main]

push runs on all branches. So, when we code on litdata github repo and make a pr, a push CI runs and since making a PR for main pull_request CI runs.

The fix is:

# .github/workflows/ci-testing.yml

name: CI testing

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

I'm making a wild guess. If it's correct, I'll make the PR.

tchaton commented 1 month ago

Hey @deependujha Go for the fix.