#!/bin/bash

set -o errexit
set -o pipefail
set -o xtrace

# docker buildx build \
#   -t admin-infra-registry.finals.2025.nautilus.institute:5000/pollers/axis:latest \
#   -f poller/Dockerfile \
#   --platform=linux/amd64 \
#   poller
# docker buildx build \
#   -t admin-infra-registry.finals.2025.nautilus.institute:5000/team/nautilus/testing/axis:latest \
#   -f Dockerfile \
#   --platform=linux/amd64 \
#   .
docker pull ghcr.io/the-nautilus-institute/axis-web-prod:latest --platform=linux/amd64
docker pull ghcr.io/the-nautilus-institute/axis-poller-prod:latest --platform=linux/amd64
docker tag \
  ghcr.io/the-nautilus-institute/axis-web-prod:latest \
  admin-infra-registry.finals.2025.nautilus.institute:5000/team/nautilus/testing/axis:latest
docker tag \
  ghcr.io/the-nautilus-institute/axis-poller-prod:latest \
  admin-infra-registry.finals.2025.nautilus.institute:5000/pollers/axis:latest


docker push \
  admin-infra-registry.finals.2025.nautilus.institute:5000/pollers/axis:latest
docker push \
  admin-infra-registry.finals.2025.nautilus.institute:5000/team/nautilus/testing/axis:latest
