ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

using ros-tooling/action-ros-ci in a private repo

asked 2022-05-31 12:44:48 -0500

clyde gravatar image

Hi, I'm trying to use ros-tooling/action-ros-ci with a private repo. Here are the contents of .github/workflows/build_test.yml:

name: ROS CI
on:
  pull_request:
  push:
    branches:
      - main

jobs:
  foxy_build:
    name: foxy_build
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2.3.4
      - uses: ros-tooling/setup-ros@0.3.2
        with:
          required-ros-distrutions: foxy
      - uses: ros-tooling/action-ros-ci@0.2.5
        with:
          package-name: gst_tools
          target-ros2-distro: foxy

IIUC, this should "just work" with a private repo. But I'm consistently getting github action errors like this:

Run ros-tooling/action-ros-ci@0.2.5
  with:
    package-name: gst_tools
    target-ros2-distro: foxy
    colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
  env:
    LANG: en_US.UTF-8

Repos files: override - none
Repos files: supplemental - none
Invoking: bash -c,rosdep update --include-eol-distros
  /usr/bin/bash -c rosdep update --include-eol-distros
  reading in sources list data from /etc/ros/rosdep/sources.list.d
  Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
  Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
  Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
  Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
  Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
  Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
  Add distro "ardent"
  Add distro "bouncy"
  Add distro "crystal"
  Add distro "dashing"
  Add distro "eloquent"
  Add distro "foxy"
  Add distro "galactic"
  Add distro "groovy"
  Add distro "humble"
  Add distro "hydro"
  Add distro "indigo"
  Add distro "jade"
  Add distro "kinetic"
  Add distro "lunar"
  Add distro "melodic"
  Add distro "noetic"
  Add distro "rolling"
  updated cache in /home/runner/.ros/rosdep/sources.cache
Invoking: bash -c,vcs diff -s --repos /home/runner/work/gst_tools/gst_tools/ros_ws | cut -d ' ' -f 1 | grep "gst_tools$" | xargs rm -rf
  /usr/bin/bash -c vcs diff -s --repos /home/runner/work/gst_tools/gst_tools/ros_ws | cut -d ' ' -f 1 | grep "gst_tools$" | xargs rm -rf
Invoking: bash -c,vcs import --force --recursive src/ < package.repo
  /usr/bin/bash -c vcs import --force --recursive src/ < package.repo
  === src/adkd07aag29/gst_tools (git) ===
  Could not clone repository 'https://github.com/clydemcqueen/gst_tools.git': Cloning into '.'...
  fatal: could not read Username for 'https://github.com': No such device or address
Error: The process '/usr/bin/bash' failed with exit code 1

In comparison, I have zero problems with creating a private repo using https://github.com/ros-tooling/action... which uses tooling/action-ros2-lint rather than ros-tooling/action-ros-ci.

Any clues?

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-06-02 14:23:25 -0500

clyde gravatar image

I forgot to add the import-token: ${{ secrets.GITHUB_TOKEN }} argument in the call to action-ros-ci. This works:

name: ROS CI
on:
  pull_request:
  push:
    branches:
      - main

jobs:
  foxy_build:
    name: foxy_build
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2.3.4
      - uses: ros-tooling/setup-ros@0.3.2
        with:
          required-ros-distrutions: foxy
      - uses: ros-tooling/action-ros-ci@0.2.5
        with:
          package-name: gst_tools
          target-ros2-distro: foxy
          import-token: ${{ secrets.GITHUB_TOKEN }}

This is in the README, but I missed it. There is a good discussion in the PR.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-05-31 12:44:48 -0500

Seen: 256 times

Last updated: Jun 02 '22