Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

self-referenced docker monorepo example with github actions and dispatch events

License

Notifications You must be signed in to change notification settings

e-graveyard/docker-monorepo-self-dependent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github tag

docker monorepo with self-dependencies

This project exemplifies how to create a Docker monorepo that has self-dependencies (one docker image based on another, inside this same repository) using GitHub Actions.

  • Sequence diagram: Tag push (click to expand)
    sequenceDiagram
        autonumber
        participant user as User
        participant github as GitHub Actions
        participant build_bare as Bare build
        participant build_full as Full build
        participant build_edge as Edge build
        participant dockerhub as Docker Hub
        participant samples as Code samples
    
        user->>github: Pushes a semver tag
        Note right of user: e.g. v0.1.0
    
        github-)build_bare: Triggers
        build_bare->>dockerhub: Pushes
        Note left of dockerhub: tag 0.1.0-bare
        build_bare-)github: Dispatches
        Note right of github: event "build-full-image"
        build_bare-->github: "bare" build ends
    
        github-)build_full: Triggers
        build_full->>dockerhub: Pulls
        Note left of dockerhub: tag 0.1.0-bare
        build_full->>dockerhub: Pushes
        Note left of dockerhub: tag 0.1.0-full
        build_full-)github: Dispatches
        Note right of github: event "build-edge-image"
        build_full-->github: "full" build ends
    
        github-)build_edge: Triggers
        build_edge->>dockerhub: Pulls
        Note left of dockerhub: tag 0.1.0-full
        build_edge->>dockerhub: Pushes
        Note left of dockerhub: tag latest
        build_edge-)github: Dispatches
        Note right of github: event "run-sample"
        build_edge-->github: "edge" build ends
    
        github-)samples: Triggers
        samples->>dockerhub: Pulls
        Note left of samples: tag latest
        samples-->github: "code samples" test ends
    
    Loading
  • Sequence diagram: Edge branch push (click to expand)
    sequenceDiagram
        autonumber
        participant user as User
        participant github as GitHub Actions
        participant build_edge as Edge build
        participant dockerhub as Docker Hub
        participant samples as Code samples
    
        user->>github: Pushes
        Note right of user: branch edge
    
        github-)build_edge: Triggers
        loop Every 8 hours
            github-)build_edge: Schedule
        end
        build_edge->>dockerhub: Pulls
        Note left of dockerhub: tag x.y.z-full
        build_edge->>dockerhub: Pushes
        Note left of dockerhub: tag latest
        build_edge-)github: Dispatches
        Note right of github: event "run-sample"
        build_edge-->github: "edge" build ends
    
        github-)samples: Triggers
        samples->>dockerhub: Pulls
        Note left of samples: tag latest
        samples-->github: "code samples" test ends
    
    Loading

License

To the extent possible under law, Caian Ertl has waived all copyright and related or neighboring rights to this work. In the spirit of freedom of information, I encourage you to fork, modify, change, share, or do whatever you like with this project! ^C ^V

License

About

self-referenced docker monorepo example with github actions and dispatch events

Topics

Resources

License

Stars

Watchers

Forks