
kind: pipeline
type: docker
name: build-multiarch-images

platform:
  os: linux
  arch: amd64

steps:
- name: make-tags
  image: node
  commands:
    - echo -n "${DRONE_TAG}, latest" > .tags

- name: build  
  image: thegeeklab/drone-docker-buildx
  privileged: true
  settings:
    dockerfile: app/Dockerfile
    context: app
    registry: git.mrmeeb.stream
    username: 
      from_secret: docker_username
    password: 
      from_secret: docker_password
    repo: git.mrmeeb.stream/mrmeeb/simple-login
    platforms:
      - linux/arm64
      - linux/amd64

- name: notify
  image: plugins/slack
  settings:
    webhook: 
      from_secret: slack_webhook
    icon_url:
      from_secret: slack_avatar

trigger:
  event:
    include:
    - tag
  ref:
    include:
    - refs/tags/**