narrow CI tag filter #34
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: 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 | |