Skip to content

Commit

Permalink
Workflow update - tests, checks (#60)
Browse files Browse the repository at this point in the history
Added industrial CI
Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
  • Loading branch information
delihus authored Aug 1, 2023
1 parent 6ffdb13 commit 51b029b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TODO: specify bump command and remove this description

Bump version workflow is triggered when PR is closed, it bumps version and triggers docker build that will be tagged with version number. To use it you have to specify bump type, available commands: `bump::patch`, `bump::minor` and `bump::major` (simply leave one of them in PR description and remove this description).
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

jobs:
get-bump:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
name: Get version bump
runs-on: ubuntu-22.04
outputs:
Expand All @@ -28,6 +29,7 @@ jobs:
run: echo "BUMP=${{ github.event.inputs.name }}" >> $GITHUB_ENV

catkin-release:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
name: Bump version
runs-on: ubuntu-22.04
needs: get-bump
Expand All @@ -48,6 +50,7 @@ jobs:
git_email: action-bot@action-bot.com

build-and-push-docker-image:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
name: Create new docker image
runs-on: ubuntu-22.04
needs: catkin-release
Expand All @@ -58,4 +61,4 @@ jobs:
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer ${{ secrets.GH_PAT }}"
https://api.github.com/repos/husarion/rosbot-docker/dispatches
-d '{"event_type":"ros-package-update"}'
-d '{"event_type":"ros-package-update"}'
25 changes: 25 additions & 0 deletions .github/workflows/industrial_ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Industrial CI
on:
workflow_call:
pull_request:
push:
branches:
- humble

jobs:
industrial_ci:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Clone installation requirements
shell: bash
run : python3 -m pip install -U vcstool &&
vcs import . < ./rosbot/rosbot_hardware.repos &&
vcs import . < ./rosbot/rosbot_simulation.repos
- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: ${{matrix.ROS_DISTRO}}

0 comments on commit 51b029b

Please sign in to comment.