Skip to content

Migrate Docker CI from ADO to Github, remove ADO pipelines (#2422) #1

Migrate Docker CI from ADO to Github, remove ADO pipelines (#2422)

Migrate Docker CI from ADO to Github, remove ADO pipelines (#2422) #1

Workflow file for this run

name: COLMAP (Docker)
on:
push:
branches:
- main
pull_request:
types: [ assigned, opened, synchronize, reopened ]
release:
types: [ published, edited ]
jobs:
build:
name: ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
run: |
dockertag=$(date +%Y%m%d).${{ github.run_number }}
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
cuda_archs="50;60;70;75;90"
else
cuda_archs="50"
fi
docker build . \
--file docker/Dockerfile \
--tag colmap/colmap:$dockertag \
--build-arg COLMAP_GIT_COMMIT="$GITHUB_SHA" \
--build-arg CUDA_ARCHITECTURES="$cuda_archs"
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
docker tag colmap/colmap:$dockertag colmap/colmap:latest
docker push colmap/colmap:$dockertag
docker push colmap/colmap:latest
fi