Skip to content

Build Deb Package

Build Deb Package #28

Workflow file for this run

name: Build Deb Package
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
release:
types: ["published"]
jobs:
build-deb-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Build Debian Package in Docker
run: |
docker run --rm -v $(pwd):/tmp debian:bullseye-slim bash -c \
"cd /tmp \
&& chmod 555 homeassistant-supervised/DEBIAN/p* \
&& dpkg-deb --build --root-owner-group homeassistant-supervised"
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: homeassistant-supervised.deb
- name: Rename for deploy
id: getfile
run: |
FILENAME="$(awk '/^Package:/ { print $2 }' homeassistant-supervised/DEBIAN/control)_$(awk '/^Version:/ { print $2 }' homeassistant-supervised/DEBIAN/control)_$(dpkg-architecture -qDEB_BUILD_ARCH).deb"
mv homeassistant-supervised.deb ${FILENAME}
echo "filename=${FILENAME}" >> $GITHUB_OUTPUT
- name: Deploy to server
uses: jethome-iot/actions/repo-upload@master
with:
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_KNOWNHOSTS_UPLOAD: ${{ secrets.SSH_KNOWNHOSTS_UPLOAD }}
distro: bookworm
path: .
files: ${{ steps.getfile.outputs.filename }}
branch: stable
- name: Deploy to server
uses: jethome-iot/actions/repo-upload@master
with:
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_KNOWNHOSTS_UPLOAD: ${{ secrets.SSH_KNOWNHOSTS_UPLOAD }}
distro: bookworm
path: .
files: ${{ steps.getfile.outputs.filename }}
branch: nightly