matrix:
  platform:
    - linux/amd64
    - linux/arm64

platform: ${platform}

labels:
  type: exec

pipeline:
- name: publish-linux
  image: bash
  commands:
  - export VERSION=$([ -z $CI_COMMIT_TAG ] && echo latest || echo $CI_COMMIT_TAG)-$(sed 's#/#-#g' <<< $CI_SYSTEM_ARCH)
  - echo $CONTAINER_PASSWORD | podman login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
  - make podman-build podman-immutable-push
  secrets:
  - codename
  - dev_registry
  - drycc_registry
  - container_username
  - container_password
  when:
    event:
    - push
    - tag

depends_on:
- test-linux