Skip to content

Commit 92c3261

Browse files
committed
set dir
1 parent 8776312 commit 92c3261

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/scan.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,26 @@ jobs:
6565
name: License check
6666
runs-on: ubuntu-latest
6767
container:
68-
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
68+
image: ros:jazzy-ros-base
6969
steps:
7070
- name: Checkout code
7171
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
72+
- name: Prepare System
73+
shell: bash
74+
run: |
75+
apt update
76+
apt install -y python3-pip golang-go
77+
pipx install ros-license-toolkit==1.2.2
78+
go install github.com/google/[email protected]
7279
- name: Check for license tags
7380
shell: bash
7481
run: |
75-
find . -type f \( -name "*.py" -o -name "*.cpp" -o -name "*.h" \) -exec /go/bin/addlicense -check {} +
82+
find . -type f \( -name "*.py" -o -name "*.cpp" -o -name "*.h" \) -exec addlicense -check {} +
7683
- name: Run ros_license_toolkit for each Package
7784
shell: bash
7885
run: |
7986
git config --global --add safe.directory /__w/scenario-execution/scenario-execution
80-
git config --global --add safe.directory /venvs/ros-license-toolkit
87+
git config --global --add safe.directory $HOME/.local/bin/
8188
find . -name "package.xml" | while IFS= read -r pkg_file; do
8289
pkg_dir=$(dirname "$pkg_file")
8390
pkg_name=$(basename "$pkg_dir")
@@ -86,6 +93,6 @@ jobs:
8693
continue
8794
fi
8895
echo "Processing package at $pkg_dir"
89-
/python_bin/ros_license_toolkit "$pkg_dir"
96+
$HOME/.local/bin/ros-license-toolkit "$pkg_dir"
9097
done
9198

0 commit comments

Comments
 (0)