From 34dea6a6cc7d7e3291cfe689cbf46dda353a3889 Mon Sep 17 00:00:00 2001 From: Mischa Taylor Date: Sun, 5 Nov 2023 10:21:10 -0500 Subject: [PATCH] Add workflow for humble-ros-core for jetson --- .../workflows/humble-ros-core-l4t-push.yml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/humble-ros-core-l4t-push.yml diff --git a/.github/workflows/humble-ros-core-l4t-push.yml b/.github/workflows/humble-ros-core-l4t-push.yml new file mode 100644 index 00000000..4ee0dd72 --- /dev/null +++ b/.github/workflows/humble-ros-core-l4t-push.yml @@ -0,0 +1,95 @@ +name: l4t-base Merge +on: + push: + branches: [ main ] + paths: + - 'nvidia/ros/humble-ros-core/**' + workflow_dispatch: + +jobs: + build: + runs-on: [self-hosted, linux, ARM64] + defaults: + run: + working-directory: 'nvidia/ros/humble-ros-core' + steps: + - uses: actions/checkout@v4 + + - name: Check the Containerfile with hadolint + run: | + $(git rev-parse --show-toplevel)/bin/lint.sh + + - name: Install QEMU static binaries + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set the tags + id: tags + run: | + echo "tags=$($(git rev-parse --show-toplevel)/bin/list-tags.sh -c)" >> $GITHUB_ENV + + - name: Set the test platform + id: test-platform + run: | + echo "test-platform=$($(git rev-parse --show-toplevel)/bin/list-platforms.sh | cut -d',' -f1)" >> $GITHUB_ENV + + - name: Build locally for testing + uses: docker/build-push-action@v5 + with: + load: true + context: nvidia/ros/humble-ros-core + file: nvidia/ros/humble-ros-core/Containerfile + tags: ${{ env.tags }} + platforms: ${{ env.test-platform }} + + - name: Run tests on the image with cinc-auditor + run: | + $(git rev-parse --show-toplevel)/bin/test.sh + + - name: Set the platforms + id: platforms + run: | + echo "platforms=$($(git rev-parse --show-toplevel)/bin/list-platforms.sh -c)" >> $GITHUB_ENV + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} + password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + context: nvidia/ros/humble-ros-core + file: nvidia/ros/humble-ros-core/Containerfile + platforms: ${{ env.platforms }} + tags: ${{ env.tags }} + env: + BUILDKIT_PROGRESS: plain + + - name: Set the image name + id: image_name + run: | + echo "image_name=$($(git rev-parse --show-toplevel)/bin/image-name.sh)" >> $GITHUB_ENV + + - name: Set the image description + id: image_description + run: | + echo "image_description=$($(git rev-parse --show-toplevel)/bin/image-description.sh)" >> $GITHUB_ENV + + - name: Set the image readme + id: image_readme + run: | + echo "image_readme=$($(git rev-parse --show-toplevel)/bin/image-readme.sh)" >> $GITHUB_ENV + + - name: Update Docker Hub Description + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} + password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} + short-description: ${{ env.image_description }} + repository: polymathrobotics/${{ env.image_name }} + readme-filepath: ${{ env.image_readme }}