Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Update test.txt to modify existing content and add a new line #25

Update test.txt to modify existing content and add a new line

Update test.txt to modify existing content and add a new line #25

Workflow file for this run

name: Build and Deploy for Raspberry Pi
on:
push:
branches:
- 76-task-deploy-workflow-for-raspberry-pi-repo
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/lib/jvm
sudo docker system prune -af
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
buildkitd-flags: --allow-insecure-entitlement network.host
- name: Build Docker image
run: |
docker buildx build \
--platform linux/arm64 \
-f deploy/dockerfiles/DockerfileDeployRasp \
--build-arg projectDir=/ \
--load \
-t rasp-app .
- name: Extract binaries from Docker image
run: |
docker create --name tmpapp rasp-app
mkdir -p artifacts/bin
docker cp tmpapp:/home/InstrumentClusterApp ./artifacts/bin/
docker cp tmpapp:/home/MiddleWareApp ./artifacts/bin/
docker rm tmpapp
- name: Prepare artifacts
run: |
mkdir -p artifacts/config
mkdir -p artifacts/fonts
cp ./ZenohConfig/InstrumentClusterConfig.json ./artifacts/config/
cp ./ZenohConfig/MiddleWareConfig.json ./artifacts/config/
cp -r ./deploy/fonts/* ./artifacts/fonts/
git archive --format=zip HEAD -o ./artifacts/source-code.zip
cd artifacts
zip -r ../release-package.zip *
cd ..
- name: Get latest tag and increment
id: tag
run: |
git fetch --tags --force
git fetch origin
latest_tag=$(git tag --sort=-v:refname | head -n 1)
if [ -z "$latest_tag" ]; then
latest_tag="v1.0.0"
fi
major=$(echo $latest_tag | cut -d. -f1 | tr -d 'v')
minor=$(echo $latest_tag | cut -d. -f2)
patch=$(echo $latest_tag | cut -d. -f3)
new_tag="v$major.$minor.$((patch + 1))"
echo "new_tag=$new_tag" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.new_tag }}
name: Release ${{ steps.tag.outputs.new_tag }}
body: |
## Raspberry Pi Release
**Includes:**
- Compiled apps (`InstrumentClusterApp`, `MiddleWareApp`)
- Zenoh config files
- Fonts
- Full source code zip
**Instructions:**
- Copy `InstrumentClusterApp` and `MiddleWareApp` to `$PI_PATH_BIN`
- Copy configs to `$PI_PATH_ETC`
- Copy fonts to `$PI_PATH_FONTS`
files: |
release-package.zip
artifacts/source-code.zip
artifacts/bin/*
env:
GITHUB_TOKEN: ${{ secrets.PAT_LUIS }}