variables: REPO_NAME: codeberg.org/video-prize-ranch/rimgo DOCKER_HOST: tcp://docker:2375 stages: - build - deploy docker: image: docker:20 stage: build services: - name: docker:20-dind command: ["--experimental"] before_script: - mkdir -p ~/.docker/cli-plugins - wget -O ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.8.1/buildx-v0.8.1.linux-amd64 - chmod +x ~/.docker/cli-plugins/docker-buildx script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker context create mybuilder - docker buildx create --use --name mybuilder mybuilder - docker buildx build --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE:latest . - docker create --name tmp $CI_REGISTRY_IMAGE:latest - docker cp tmp:/app/rimgo rimgo - docker rm -f tmp artifacts: paths: - rimgo deploy: image: alpine:latest stage: deploy before_script: - apk update && apk --no-cache add curl git - wget -O - https://fly.io/install.sh | sh - git clone https://codeberg.org/video-prize-ranch/fly-cfg.git script: - cd fly-cfg - /root/.fly/bin/flyctl deploy --no-cache --detach