File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 38
38
ros_distribution : rolling
39
39
ros_version : 2
40
40
runs-on : ubuntu-latest
41
+ permissions :
42
+ contents : write
43
+ pull-requests : write
41
44
container :
42
45
image : ${{ matrix.docker_image }}
43
46
steps :
@@ -67,16 +70,24 @@ jobs:
67
70
68
71
- name : Submit PR
69
72
run : |
73
+ if git diff --exit-code; then
74
+ exit 0
75
+ fi
70
76
git config --global user.email "[email protected] "
71
77
git config --global user.name "GitHub Action"
78
+ git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
79
+ git remote update origin
72
80
CREATE_PR=0
73
81
if !git checkout update-bindings-${{ matrix.ros_distribution }}; then
74
82
CREATE_PR=1
75
83
git checkout -b update-bindings-${{ matrix.ros_distribution }}
76
84
fi
77
- git add .
85
+ git add rclrs/src/rcl_bindings_generated_${{ matrix.ros_distribution }}.rs
78
86
git commit -m "Regenerate bindings for ${{ matrix.ros_distribution }}"
79
87
git push -u origin update-bindings-${{ matrix.ros_distribution }}
80
88
if [ $CREATE_PR -eq 1 ]; then
81
89
gh pr create --base main --head update-bindings-${{ matrix.ros_distribution }} --title "Regenerate bindings for ${{ matrix.ros_distribution }}" --body "This PR regenerates the bindings for ${{ matrix.ros_distribution }}."
82
- fi
90
+ fi
91
+ env :
92
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
93
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments