Skip to content

Commit

Permalink
Add workflow for humble-ros-core for jetson
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Nov 5, 2023
1 parent 30e0fe3 commit 34dea6a
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/humble-ros-core-l4t-push.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 34dea6a

Please sign in to comment.