when:
  branch: [main, high-performance]
  event: push

steps:
  - name: build-and-push
    image: woodpeckerci/plugin-docker-buildx:5.0.0
    settings:
      insecure: true
      registry: docker-registry.registry.svc.cluster.local:5000
      repo: docker-registry.registry.svc.cluster.local:5000/nxtgauge-frontend-solid
      dockerfile: Dockerfile.simple
      tags:
        - ${CI_COMMIT_SHA}
        - latest
        - high-performance-latest
      username:
        from_secret: REGISTRY_USERNAME
      password:
        from_secret: REGISTRY_PASSWORD
      platforms: linux/amd64
      cache_from: docker-registry.registry.svc.cluster.local:5000/nxtgauge-frontend-solid:cache
      cache_to: docker-registry.registry.svc.cluster.local:5000/nxtgauge-frontend-solid:cache
