Skip to content

Merge pull request #12 from ubuntu-robotics/artivis-patch-2 #37

Merge pull request #12 from ubuntu-robotics/artivis-patch-2

Merge pull request #12 from ubuntu-robotics/artivis-patch-2 #37

name: TurtleBot3c Ubuntu Core image
on:
push:
branches:
- noetic
tags:
- '*-noetic'
pull_request:
branches:
- noetic
workflow_dispatch:
jobs:
turtlebot3c-gadget-snap:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build snap
id: build-snap
uses: snapcore/action-build@v1
with:
path: turtlebot3c-gadget
- name: Upload snap artifact
uses: actions/upload-artifact@v4
with:
name: turtlebot3c-gadget-snap
path: ${{ steps.build-snap.outputs.snap }}
ubuntu-image:
runs-on: ubuntu-latest
needs: turtlebot3c-gadget-snap
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download gadget snap
uses: actions/download-artifact@v4
with:
name: turtlebot3c-gadget-snap
path: gadget
- name: Build the Ubuntu Core image
run: |
sudo snap install ubuntu-image --classic
ubuntu-image snap turtlebot3c.model --snap ./gadget/turtlebot3c*.snap
- name: Upload snap artifact
uses: actions/upload-artifact@v4
with:
name: turtlebot3c-ubuntu-image
path: turtlebot3c.img
release-image:
runs-on: ubuntu-latest
needs: ubuntu-image
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Download TurtleBot3c image
uses: actions/download-artifact@v4
with:
name: turtlebot3c-ubuntu-image
path: .
# The image must be compressed.
# GH release max file size is 2GB
# and the uncompressed image is 3.5GB.
- name: Compress the Ubuntu image
run: |
tar czf turtlebot3c.img.tar.gz turtlebot3c.img
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
turtlebot3c.img.tar.gz