This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push Docker Image | |
| # test | |
| on: | |
| push: | |
| jobs: | |
| build-and-push: | |
| runs-on: self-hosted | |
| container: | |
| image: ubuntu:22.04 | |
| options: --privileged -v /var/run/docker.sock:/var/run/docker.sock | |
| steps: | |
| - name: Install Docker CLI and Buildx | |
| run: | | |
| apt update | |
| apt install -y --no-install-recommends docker.io curl git ca-certificates | |
| mkdir -p ~/.docker/cli-plugins | |
| curl -sSL https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64 -o ~/.docker/cli-plugins/docker-buildx | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Mark repo as safe | |
| run: | | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - name: Log into GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: whereami | |
| run: | | |
| ls -la | |
| - name: Init submodules and set TERM | |
| run: | | |
| git submodule update --init --recursive | |
| echo "TERM=xterm" >> $GITHUB_ENV | |
| - name: Build docker images | |
| run: | | |
| ./submodules/isaac_ros_common/scripts/build_image_layers.sh -i aarch64.ros2_humble.main |