github: deb-builder: add Ubuntu 18.04 #39
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: Build Debian Package | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu:22.04', 'ubuntu:20.04', 'ubuntu:18.04', 'debian:stable', 'debian:testing', 'debian:unstable', 'debian:oldstable'] | |
arch: ['amd64', 'arm64', 'armhf'] | |
exclude: | |
- os: ubuntu:22.04 | |
arch: arm64 | |
- os: ubuntu:22.04 | |
arch: armhf | |
- os: ubuntu:20.04 | |
arch: arm64 | |
- os: ubuntu:20.04 | |
arch: armhf | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Update base container | |
run: sudo apt-get -y update | |
- name: Set up binfmt with qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: Build Debian Package | |
uses: leonheldattoradex/build-deb-action@v1.7.1 | |
env: | |
DEB_BUILD_OPTIONS: noautodbgsym | |
with: | |
buildpackage-opts: --build=binary --no-sign | |
host-arch: ${{ matrix.arch }} | |
apt-opts: --install-recommends | |
extra-build-deps: ca-certificates | |
docker-image: ${{ matrix.os }} | |
- name: Generating artifact filename | |
run: | | |
os_no_colon=$(echo "${{ matrix.os }}" | tr ':' '-') | |
echo "artifacts=aktualizr-${os_no_colon}-${{ matrix.arch }}" >> $GITHUB_ENV | |
- name: Upload Workflow Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.artifacts }} | |
path: debian/artifacts/* | |
retention-days: 90 | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build | |
env: | |
artifacts-dir: artifacts | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Update base container | |
run: sudo apt-get -y update | |
- name: Download Artifacts | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
mkdir -p ${{ github.workspace }}/${{ env.artifacts-dir }} | |
cd ${{ github.workspace }}/${{ env.artifacts-dir }} | |
gh run download ${{ github.run_id }} | |
- name: Zip Folders | |
run: | | |
cd ${{ github.workspace }}/${{ env.artifacts-dir }} | |
for folder in aktualizr*; do | |
zip -r "${folder}.zip" "$folder" | |
done | |
- name: Release | |
# FIXME: use tag when https://github.com/softprops/action-gh-release/issues/410 is closed | |
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: ${{ github.workspace }}/${{ env.artifacts-dir }}/*.zip |