---
kind: pipeline
type: docker
name: BUILD-TEST
steps:
  - name: Build Multi-arch
    image: alcapone1933/drone:docker-buildx
    privileged: true
    settings:
      platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
      repo: alcapone1933/ddns-ipv64
      tags: latest
      dry_run: true

trigger:
  branch:
  - master
  event:
  - custom
  - push
  - pull_request

---
kind: pipeline
type: docker
name: BUILD-Dockerhub-Version
steps:
  - name: Build Multi-arch
    image: alcapone1933/drone:docker-buildx
    privileged: true
    settings:
      username: 
        from_secret: DOCKER_USER
      password: 
        from_secret: DOCKER_PASS    
      platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
      repo: alcapone1933/ddns-ipv64
      # tags: latest
      auto_tag: true
      auto_tag_suffix: v0.1.2

trigger:
  branch:
  - master
  event:
  - custom
  # - push
  # - pull_request

depends_on:
  - BUILD-TEST

---
kind: pipeline
type: docker
name: BUILD-Dockerhub-Latest
steps:
  - name: Build Multi-arch
    image: alcapone1933/drone:docker-buildx
    privileged: true
    settings:
      username: 
        from_secret: DOCKER_USER
      password: 
        from_secret: DOCKER_PASS    
      platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
      repo: alcapone1933/ddns-ipv64
      # tags: latest
      auto_tag: true

trigger:
  branch:
  - master
  event:
  - custom
  # - push
  # - pull_request

depends_on:
  - BUILD-Dockerhub-Version
---
kind: pipeline
type: docker
name: BUILD-TEST-DEV
steps:
  - name: Build Multi-arch
    image: alcapone1933/drone:docker-buildx
    privileged: true
    settings:
      platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
      repo: alcapone1933/ddns-ipv64
      tags: dev
      dry_run: true

trigger:
  branch:
  - development
  event:
  - custom
  # - push
  # - pull_request

---
kind: pipeline
type: docker
name: BUILD-Dockerhub-DEV
steps:
  - name: Build Multi-arch
    image: alcapone1933/drone:docker-buildx
    privileged: true
    settings:
      username: 
        from_secret: DOCKER_USER
      password: 
        from_secret: DOCKER_PASS    
      platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
      repo: alcapone1933/ddns-ipv64
      tags: dev
      # auto_tag: true
      # auto_tag_suffix: dev

trigger:
  branch:
  - development
  event:
  - custom
  # - push
  # - pull_request

depends_on:
  - BUILD-TEST-DEV
