kind: pipeline
type: docker
name: default

steps:
- name: dockerhub
  image: hairyhenderson/dockerfiles-builder:latest
  commands:
  - bashbrew build caddy
  - echo $PASSWORD | docker login --username $USERNAME --password-stdin
  - bashbrew push productionwentdown/caddy
  environment:
    BASHBREW_LIBRARY: ./library
    BASHBREW_NAMESPACE: caddy
    USERNAME:
      from_secret: dockerhub_username
    PASSWORD:
      from_secret: dockerhub_token

kind: pipeline
type: docker
name: default

steps:
- name: dockerhub
  image: hairyhenderson/dockerfiles-builder:latest
  privileged: true
  commands:
  - bashbrew build caddy
  - echo $PASSWORD | docker login --username $USERNAME --password-stdin
  - bashbrew push productionwentdown/caddy
  environment:
    BASHBREW_LIBRARY: ./library
    BASHBREW_NAMESPACE: caddy
    USERNAME:
      from_secret: dockerhub_username
    PASSWORD:
      from_secret: dockerhub_token

Allow privileged use of Docker in the host
Allow privileged use of Docker in the host
