Skip to content

Commit 4396544

Browse files
committed
update syntax
1 parent b3d9376 commit 4396544

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/build_base_images.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,27 @@ jobs:
2828
host: [desktop, tegra]
2929
include:
3030
# configuration for desktop base image
31-
- image_tag: ${{ env.DESKTOP_IMAGE_TAG }}
32-
base_image: ros:noetic-ros-base
31+
- base_image: ros:noetic-ros-base
3332
platform: linux/amd64
3433
architecture: amd64
3534
host: desktop
3635
# configuration for tegra base image
37-
- image_tag: ${{ env.TEGRA_IMAGE_TAG }}
38-
base_image: dustynv/ros:noetic-ros-base-l4t-r35.2.1
36+
- base_image: dustynv/ros:noetic-ros-base-l4t-r35.2.1
3937
platform: linux/arm64
4038
architecture: arm64
4139
host: tegra
4240

4341
steps:
4442
- name: Get datetime for logging
45-
id: datetime
46-
run: echo "datetime=$(date +'%Y_%m_%d_%H_%M_%S')" >> $GITHUB_OUTPUT
43+
id: matrix_info
44+
run: |
45+
if [ "${{ matrix.host }}" == "desktop" ]; then
46+
echo "image_tag=${{ env.DESKTOP_IMAGE_TAG }}" >> $GITHUB_OUTPUT
47+
elif [ "${{ matrix.host }}" == "tegra" ]; then
48+
echo "image_tag=${{ env.TEGRA_IMAGE_TAG }}" >> $GITHUB_OUTPUT
49+
else
50+
exit 1
51+
fi
4752
4853
- name: Checkout
4954
uses: actions/checkout@v4
@@ -75,8 +80,8 @@ jobs:
7580
cache-from: type=gha
7681
cache-to: type=gha,mode=max
7782
tags: |
78-
${{ matrix.image_tag }}:latest
79-
${{ matrix.image_tag }}:${{ github.sha }}
83+
${{ steps.matrix_info.outputs.datetime }}:latest
84+
${{ steps.matrix_info.outputs.datetime }}:${{ github.sha }}
8085
8186
create-manifests:
8287
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)