Skip to content

Commit 27fd865

Browse files
authored
ci: fix expired ROS 2 keys (#616)
1 parent 4c3463a commit 27fd865

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/poetry-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ jobs:
3030
with:
3131
clean: true
3232

33+
- name: Fix ROS 2 keys # TODO: remove this once https://github.com/docker-library/official-images/pull/19162 is merged
34+
run: |
35+
rm /etc/apt/sources.list.d/ros2-latest.list
36+
rm /usr/share/keyrings/ros2-latest-archive-keyring.gpg
37+
apt-get update
38+
apt-get install -y ca-certificates curl
39+
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') ;\
40+
curl -L -s -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \
41+
&& apt-get update \
42+
&& apt-get install /tmp/ros2-apt-source.deb \
43+
&& rm -f /tmp/ros2-apt-source.deb
44+
3345
- name: Install Poetry
3446
uses: snok/install-poetry@v1
3547
with:

.github/workflows/pre-commit.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ jobs:
1616
image: osrf/ros:humble-desktop-full
1717

1818
steps:
19+
- name: Fix ROS 2 keys # TODO: remove this once https://github.com/docker-library/official-images/pull/19162 is merged
20+
run: |
21+
rm /etc/apt/sources.list.d/ros2-latest.list
22+
rm /usr/share/keyrings/ros2-latest-archive-keyring.gpg
23+
apt-get update
24+
apt-get install -y ca-certificates curl
25+
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') ;\
26+
curl -L -s -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \
27+
&& apt-get update \
28+
&& apt-get install /tmp/ros2-apt-source.deb \
29+
&& rm -f /tmp/ros2-apt-source.deb
30+
1931
- name: Install pre-commit
2032
run: |
2133
apt update && apt install -y python3-pip shellcheck python-is-python3

0 commit comments

Comments
 (0)