git-build.yaml 715 B

123456789101112131415161718192021222324252627282930
  1. ---
  2. # Kestra Docker Git Build Template
  3. # ---
  4. #
  5. # Build a Docker image from a Git repository.
  6. #
  7. id: docker-git-build
  8. namespace: # your-namespace
  9. tasks:
  10. - id: git
  11. type: io.kestra.core.tasks.flows.WorkingDirectory
  12. tasks:
  13. - id: clone
  14. type: io.kestra.plugin.git.Clone
  15. url: https://your-git-repo-url
  16. branch: your-branch
  17. - id: build
  18. type: io.kestra.plugin.docker.Build
  19. dockerfile: "src/Dockerfile"
  20. tags:
  21. - your-username/your-repository:your-tag
  22. push: true
  23. credentials:
  24. registry: https://index.docker.io/v1/
  25. username: "{{ secret('YOUR_USERNAME') }}"
  26. password: "{{ secret('YOUR_PASSWORD') }}"