#running dagger pipeline locally after each commit to main

1 messages · Page 1 of 1 (latest)

valid geode
#

Hi folks
Is there an example that shows how to run dagger locally after a commit is made to main (or any other ) branch ? i am not sure if running github actions locally is the proper way to acheive this ? i am open to all suggestions

half shard
#

hey @valid geode ! Dagger running locally after each commit is as simple as doing dagger run against your Dagger pipelines

#

are you looking for an automated way to trigger those pipelines locally after a commit is made?

valid geode
half shard
drifting moth
#

Btw.: If you use python (or JS I think 🤔) you might also look into pre-commit. This tool uses git-hooks under the hood and can be configured like a pipeline via yaml. You can specify commit- and also push-trigger and run your custom dagger pipeline:

-   repo: local
    hooks:
    -   id: pytest-unittests
        name: unittests
        entry: pytest tests/unittests
        language: system
        types: [python]
        pass_filenames: false
        stages: [commit]
    -   id: dagger-pipeline
        name: pipeline-unittests
        entry: python pipeline/ci_main.py
        language: system
        stages: [push]

Of course, there a lot more things you can do with pre-commit.