First try at github action #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Config in Other Repos | |
on: | |
push: | |
branches: | |
- gogiputtar/testing_github_actions | |
jobs: | |
update-config: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout robot-config repo | |
uses: actions/checkout@v3 | |
- name: Set up Git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
- name: Clone hebi-python-examples repo | |
run: git clone https://github.com/HebiRobotics/hebi-python-examples.git | |
- name: Replace arm's config directory in hebi-python-examples | |
run: | | |
rm -rf hebi-python-examples/kits/arm/config | |
cp -r robot-config/arms/config hebi-python-examples/kits/arm/config | |
- name: Commit and Push changes to hebi-python-examples | |
run: | | |
cd hebi-python-examples | |
git checkout -b update-config | |
git add kits/arm/config | |
git commit -m "Update config directory from robot-config" | |
git push origin update-config | |
- name: Create Pull Request for hebi-python-examples | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Update config directory from robot-config" | |
branch: update-config | |
base: gogiputtar/testing_github_actions | |
title: "Update config directory from robot-config" | |
body: "This PR updates the config directory from the latest version in the robot-config repository." |