---
kind: pipeline
type: kubernetes
name: default

metadata:
  namespace: git

steps:
  - name: build
    image: docker
    privileged: true
    environment: 
      TOKEN:
        from_secret: gitea
    commands:
      - dockerd &
      - docker login -u kieran -p $TOKEN git.v0l.io
      - docker build -t git.v0l.io/kieran/nostr-services:latest -f NostrServices/Dockerfile .
      - docker push git.v0l.io/kieran/nostr-services:latest
      - docker build -t git.v0l.io/kieran/pay-reactions:latest -f PayForReactions/Dockerfile .
      - docker push git.v0l.io/kieran/pay-reactions:latest
      - kill $(cat /var/run/docker.pid)

