Skip to content

Commit 646844f

Browse files
authored
ci: fetch entire git history. Fix syntax for checking if a branch already exists (#523)
Signed-off-by: GitHub Action <[email protected]>
1 parent 8dad6cc commit 646844f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/generate-bindings.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jobs:
4444
container:
4545
image: ${{ matrix.docker_image }}
4646
steps:
47-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v5
48+
with:
49+
fetch-depth: 0
4850

4951
- name: Setup ROS environment
5052
uses: ros-tooling/[email protected]
@@ -71,7 +73,6 @@ jobs:
7173
7274
- name: Submit PR
7375
run: |
74-
cd rclrs/src
7576
if git diff --exit-code; then
7677
exit 0
7778
fi
@@ -80,11 +81,11 @@ jobs:
8081
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
8182
git remote update origin
8283
CREATE_PR=0
83-
if !git checkout update-bindings-${{ matrix.ros_distribution }}; then
84+
if ! git checkout update-bindings-${{ matrix.ros_distribution }}; then
8485
CREATE_PR=1
8586
git checkout -b update-bindings-${{ matrix.ros_distribution }}
8687
fi
87-
git add rcl_bindings_generated_${{ matrix.ros_distribution }}.rs
88+
git add rclrs/src/rcl_bindings_generated_${{ matrix.ros_distribution }}.rs
8889
git commit -m "Regenerate bindings for ${{ matrix.ros_distribution }}"
8990
git push -u origin update-bindings-${{ matrix.ros_distribution }}
9091
if [ $CREATE_PR -eq 1 ]; then

0 commit comments

Comments
 (0)