Skip to content

Fix lint issues

Fix lint issues #7

Workflow file for this run

name: ros
on:
push:
branches: [ main ]
paths:
- 'ros/humble/ubuntu/jammy/**'
pull_request:
branches: [ main ]
paths:
- 'ros/humble/ubuntu/jammy/**'
workflow_dispatch:
jobs:
# Job to run change detection
changes:
runs-on: [self-hosted]
outputs:
images: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
filters: |
ros/humble/ubuntu/jammy: 'ros/humble/ubuntu/jammy/**'
build:
needs: changes
strategy:
matrix:
image: ${{ fromJSON(needs.changes.outputs.images) }}
if: ${{ needs.changes.outputs.images != '[]' && needs.changes.outputs.images != '' }}
runs-on: [self-hosted]
defaults:
run:
working-directory: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- name: Check the Containerfile with hadolint
shell: bash
working-directory: ${{ matrix.image }}
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: Build locally for testing
uses: docker/bake-action@v4
with:
workdir: ${{ matrix.image }}
targets: local
load: true
- name: Run tests on the image with cinc-auditor
shell: bash
working-directory: ${{ matrix.image }}
run: |
json_data="$(docker buildx bake local --print 2>/dev/null)"
test_image=$(echo "$json_data" | jq -r '.target | to_entries[0].value | .tags[0]')
$(git rev-parse --show-toplevel)/bin/test-matrix.sh $test_image