From e65abc36d55ffba9b1e454b143bedc87911f4668 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Sun, 6 Jun 2021 18:06:01 +0200 Subject: [PATCH 1/5] (actions) auto build on pushes to develop --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 384d890d9..368862d07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,3 +23,8 @@ jobs: run: docker build --build-arg ROS_DISTRO="${{ matrix.ros_distro }}" --build-arg NODE_VERSION="${{ matrix.node_version }}" -t roslibjsdocker . - name: Tests run: docker run -v $(pwd):/root/roslibjs --rm roslibjsdocker bash -i -c 'bash /root/roslibjs/test/build.bash' + - uses: stefanzweifel/git-auto-commit-action@v4 + if: ${{ (github.event_name == 'push' && github.ref == 'develop' }} + with: + commit_message: Update Build + file_pattern: 'build/*.js' From 2b7808d2c5f36ef1b8f6aaa5eed45ed30f427045 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Sun, 6 Jun 2021 18:11:45 +0200 Subject: [PATCH 2/5] Remove check on build folder As build is update on push to develop --- test/build.bash | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test/build.bash b/test/build.bash index fdff7d52c..76389f660 100644 --- a/test/build.bash +++ b/test/build.bash @@ -32,13 +32,3 @@ echo -e "\e[1m\e[35mnpm run test-examples\e[0m" npm run test-examples echo -e "\e[1m\e[35mnpm run test-workersocket\e[0m" npm run test-workersocket - -echo -e "\e[1m\e[35mChecking build folder is up-to-date with library\e[0m" -changed_build_files=$(git -C "$(git rev-parse --show-toplevel)" diff --name-only HEAD -- build) -if [ -n "$changed_build_files" ] -then - echo -e "\e[1m\e[31mBuild folder is out-of-sync with library. Build library, npm run build, and (ammend) commit\e[0m" - exit 1 -else - echo -e "\e[1m\e[32mBuild folder is up-to-date with library\e[0m" -fi From 36c886e8043c1363e6022c480cb49deec586be7c Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Sun, 6 Jun 2021 19:50:57 +0200 Subject: [PATCH 3/5] (actions) only push build changes on one ROS distro --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 368862d07..278416032 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - name: Tests run: docker run -v $(pwd):/root/roslibjs --rm roslibjsdocker bash -i -c 'bash /root/roslibjs/test/build.bash' - uses: stefanzweifel/git-auto-commit-action@v4 - if: ${{ (github.event_name == 'push' && github.ref == 'develop' }} + if: ${{ github.event_name == 'push' && github.ref == 'develop' && matrix.ros_distro == 'noetic' }} with: commit_message: Update Build file_pattern: 'build/*.js' From 0767a8ceeee4062bb79155e94ad955efe6f7a348 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Sun, 13 Jun 2021 08:27:28 +0200 Subject: [PATCH 4/5] (actions) Use RWT-bot token --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 278416032..96fccc36c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,8 @@ jobs: node_version: [14] steps: - uses: actions/checkout@v2 + with: + token: ${{ secrets.RWT_BOT_PAT }} - name: Docker pull run: docker pull ros:${{ matrix.ros_distro }}-ros-core - name: Docker build From c4e0b56d397494837058e5d49696e2874ea3eff8 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Fri, 18 Jun 2021 14:47:39 +0200 Subject: [PATCH 5/5] (actions) don't run if actor is RWT-bot --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 96fccc36c..dd5b4fe1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,7 @@ on: jobs: ci: name: ${{ matrix.ros_distro }} + if: ${{ github.actor != 'RWT-bot' }} runs-on: ubuntu-latest strategy: fail-fast: false