# https://woodpecker-ci.org/plugins/docker-buildx
# enable Package unit and go to /scip/-/packages after building to link to proj

variables:
  - &repo codeberg.org/${CI_REPO_OWNER}/ephemerup

steps:
  dryrun:
    image: docker.io/woodpeckerci/plugin-docker-buildx:6.0.3
    settings:
      dockerfile: Dockerfile
      platforms: linux/amd64
      dry_run: true
      repo: *repo
      tags: latest
    when:
      event: [push,manual]

  publish:
    image: docker.io/woodpeckerci/plugin-docker-buildx:6.0.3
    settings:
      dockerfile: Dockerfile
      platforms: linux/amd64
      repo: *repo
      registry: codeberg.org
      tags: latest,${CI_COMMIT_SHA:0:8},${CI_COMMIT_TAG}
      username: ${CI_REPO_OWNER}
      password:
        from_secret: REGISTRY_TOKEN
    when:
      event: [tag,manual]
      branch: main
