sdv-motd: fixed detection of network devices and connections #6
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
# /******************************************************************************** | |
# * Copyright (c) 2023 Contributors to the Eclipse Foundation | |
# * | |
# * See the NOTICE file(s) distributed with this work for additional | |
# * information regarding copyright ownership. | |
# * | |
# * This program and the accompanying materials are made available under the | |
# * terms of the Apache License 2.0 which is available at | |
# * https://www.apache.org/licenses/LICENSE-2.0 | |
# * | |
# * SPDX-License-Identifier: Apache-2.0 | |
# ********************************************************************************/ | |
# | |
name: Build Leda-Utils | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
paths: | |
- 'src/sh/**' | |
- 'src/tests/**' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
- name: Run ShellCheck | |
uses: azohra/shell-linter@latest | |
with: | |
path: "src/sh" | |
- name: sh-checker | |
uses: luizm/action-sh-checker@v0.7.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
sh_checker_comment: true | |
sh_checker_shfmt_disable: true | |
- name: Shell Tests | |
run: | | |
./run-tests.sh | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
name: Shell Tests # Name of the check run which will be created | |
path: reports/report.xml # Path to test results | |
reporter: jest-junit | |
- name: Debian Package Preparation | |
run: | | |
mkdir -p .debpkg/usr/bin | |
mkdir -p .debpkg/etc/sdv | |
cp src/sh/* .debpkg/usr/bin | |
cp src/sh/sdv.conf .debpkg/etc/sdv | |
chmod +x .debpkg/usr/bin/* | |
# create DEBIAN directory if you want to add other pre/post scripts | |
mkdir -p .debpkg/DEBIAN | |
cat <<EOT > .debpkg/DEBIAN/copyright | |
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | |
Upstream-Name: Eclipse Leda | |
Source: github.com/eclipse-leda/ | |
Files: * | |
Copyright: 2022-2023, Contributors to the Eclipse Foundation | |
License: APL-2.0 | |
EOT | |
- name: Set variables | |
run: | | |
git describe --tags --always --long | |
echo "package_version=`echo $(git describe --tags --always --long | tr -d [:alpha:] | sed 's/-/./g')`" >> $GITHUB_ENV | |
- uses: jiro4989/build-deb-action@v2 | |
with: | |
package: eclipse-leda-utils | |
package_root: .debpkg | |
maintainer: Eclipse Leda Development Team | |
version: '${{ env.package_version }}' | |
arch: 'all' | |
desc: 'Shell utilities for Eclipse Leda (Software-Defined Vehicle)' | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: leda-utils-debian | |
path: | |
./*.deb | |