diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5dc19917e5..3ab6ff4075 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,6 +22,7 @@ jobs: ros: ${{ steps.filter.outputs.ros }} python: ${{ steps.filter.outputs.python }} dev: ${{ steps.filter.outputs.dev }} + navigation: ${{ steps.filter.outputs.navigation }} tests: ${{ steps.filter.outputs.tests }} branch-tag: ${{ steps.set-tag.outputs.branch_tag }} steps: @@ -52,6 +53,11 @@ jobs: dev: - docker/dev/** + navigation: + - .github/workflows/_docker-build-template.yml + - .github/workflows/docker.yml + - docker/navigation/** + tests: - dimos/** @@ -130,6 +136,57 @@ jobs: to-image: ghcr.io/dimensionalos/dev:${{ needs.check-changes.outputs.branch-tag }} dockerfile: dev + navigation: + needs: [check-changes] + if: needs.check-changes.outputs.navigation == 'true' + runs-on: [self-hosted, Linux] + permissions: + contents: read + packages: write + steps: + - name: Fix permissions + run: | + sudo chown -R $USER:$USER ${{ github.workspace }} || true + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Checkout ros-navigation-autonomy-stack + uses: actions/checkout@v4 + with: + repository: dimensionalOS/ros-navigation-autonomy-stack + ref: fastlio2 + path: docker/navigation/ros-navigation-autonomy-stack + fetch-depth: 1 + lfs: false + token: ${{ secrets.NAV_REPO_READ_TOKEN }} + + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - uses: crazy-max/ghaction-github-runtime@v3 + + - uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true + use: true + + - uses: docker/build-push-action@v6 + with: + push: true + context: . + file: docker/navigation/Dockerfile + tags: ghcr.io/dimensionalos/navigation:${{ needs.check-changes.outputs.branch-tag }} + cache-from: type=gha,scope=navigation + cache-to: type=gha,mode=max,scope=navigation + build-args: | + ROS_DISTRO=humble + ros-dev: needs: [check-changes, ros-python] if: always()