diff --git a/.github/workflows/l4t-base-push.yml b/.github/workflows/l4t-base-push.yml index 33cd24d5..0a300a28 100644 --- a/.github/workflows/l4t-base-push.yml +++ b/.github/workflows/l4t-base-push.yml @@ -42,3 +42,49 @@ jobs: - 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/l4t-base/r35.4.1 + file: nvidia/l4t-base/r35.4.1/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 }}