-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for humble-ros-core for jetson
- Loading branch information
1 parent
30e0fe3
commit 34dea6a
Showing
1 changed file
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 }} |