From 26d8c0a4cbf957f1278c2e9c0c6f2279bfbc53e3 Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Sun, 5 Jan 2025 00:32:15 +0900 Subject: [PATCH] add playstation_controller_interface package to the yaml (#380) * add playstation_controller_interface package to the yaml Signed-off-by: Masaya Kataoka * modify deploy action Signed-off-by: Masaya Kataoka --------- Signed-off-by: Masaya Kataoka --- .github/workflows/deploy_workflow.yaml | 19 ++++++++++++------- ansible/roles/clone_packages/tasks/main.yml | 6 ++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy_workflow.yaml b/.github/workflows/deploy_workflow.yaml index 60011073e..bf41d720e 100644 --- a/.github/workflows/deploy_workflow.yaml +++ b/.github/workflows/deploy_workflow.yaml @@ -112,17 +112,22 @@ jobs: run: | git add -N . echo "name=count::$(git diff --name-only | wc -l)" >> "$GITHUB_OUTPUT" - - name: Check default branch - id: check_default_branch + - name: Check branch exist + id: check_branch run: | - echo "name=default_branch::$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')" >> "$GITHUB_OUTPUT" + if git ls-remote --heads https://github.com/OUXT-Polaris/${{ matrix.package_name }}.git workflow/sync | grep -q 'refs/heads/workflow/sync'; then + echo "exist=true" >> "$GITHUB_OUTPUT" + else + echo "exist=false" >> "$GITHUB_OUTPUT" + fi - name: Delete old branch - if: steps.check_branch.outputs.exist == 1 + if: steps.check_branch.outputs.exist == 'true' run: | - git push origin --delete workflow/sync; exit 0 + git push origin --delete workflow/sync || true - name: Print deleted branch - if: steps.check_branch.outputs.exist == 1 - run: "echo 'Deleted branches: ${{ steps.delete_stuff.outputs.deleted_branches }}'" + if: steps.check_branch.outputs.exist == 'true' + run: | + echo "Deleted branch workflow/sync" - uses: peter-evans/create-pull-request@v3 id: create_pull_request if: steps.changes.outputs.count > 0 diff --git a/ansible/roles/clone_packages/tasks/main.yml b/ansible/roles/clone_packages/tasks/main.yml index f4f252799..c1fa199ea 100644 --- a/ansible/roles/clone_packages/tasks/main.yml +++ b/ansible/roles/clone_packages/tasks/main.yml @@ -254,6 +254,12 @@ version: master accept_hostkey: yes tags: [driver] +- name: clone + git: + repo: https://github.com/HarvestX/PlayStation-JoyInterface-ROS2.git + dest: "{{workspace_path}}/src/drivers/playstation_joy_interfaces" + version: humble + accept_hostkey: yes # Control Package - name: clone usv_controller package