Skip to content

Commit

Permalink
rewrite build
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Jul 14, 2023
1 parent c363428 commit 949a5cc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/build-deb-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ on:


jobs:
# define job to build and publish docker image
build-and-push-deb-pkg:
name: Build deb package and push to repositories
# run only when code is compiling and tests are passing
runs-on: ubuntu-latest

# steps to perform in job
steps:
- name: Build Debian package
uses: pi-top/debian-package-build-action@master
- name: Checkout the repo
uses: actions/checkout@v2

- name: Build package
uses: addnab/docker-run-action@v3
with:
target_architecture: amd64
docker_image: ghcr.io/calaos/debian_deb_build_base
build_directory: artifacts
image: calaos/debian_deb_build_base
options: -v ${{ github.workspace }}:/work
run: |
/build-deb.sh
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: deb
path: artifacts/*.deb
path: pkg/*.deb
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ RUN apt -y update && \
apt -y upgrade && \
apt-get install -yq --no-install-recommends devscripts debhelper dpkg-dev fakeroot lintian sudo \
pkgconf golang libbtrfs-dev libdevmapper-dev libgpgme-dev

COPY build-deb.sh /build-deb.sh
14 changes: 14 additions & 0 deletions docker/build-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -e

workdir="/work"


cd $workdir || exit

apt-get build-dep -y .
dpkg-buildpackage -us -uc -b

mkdir $workdir/pkg
mv ../calaos-container_*.deb $workdir/pkg

0 comments on commit 949a5cc

Please sign in to comment.