-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (76 loc) · 2.81 KB
/
l4t-base-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: l4t-base Merge
on:
push:
branches: [ main ]
paths:
- 'nvidia/l4t-base/r35.4.1/**'
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, linux, ARM64]
defaults:
run:
working-directory: 'nvidia/l4t-base/r35.4.1'
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 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/l4t-base/r35.4.1
file: nvidia/l4t-base/r35.4.1/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/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 }}