---
when:
  event:
    - push

steps:
  - name: Build and push a container image
    image: zot.badhouseplants.net/badhouseplants/badhouseplants-builder:latest
    environment:
      BUILDAH_REG: zot.badhouseplants.net/badhouseplants/xray-docs
      REGISTRY_TOKEN:
        from_secret: registry_token
    privileged: true
    commands:
      - build-container
    backend_options:
      kubernetes:
        resources:
          requests:
            memory: 500Mi
            cpu: 200m
          limits:
            memory: 500Mi
        securityContext:
          privileged: true
