Skip to content

Commit

Permalink
Attempt to fix debhelper bug, fixed build-release.yaml syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtoobii committed May 5, 2021
1 parent c7e15e2 commit 4dc3f40
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/actions/build-release-action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN apt-get -y update && \
nodejs \
libkrb5-dev \
libqrencode-dev \
g++
g++ \
zlib1g-dev

COPY make-deb.sh /make-deb.sh

Expand Down
13 changes: 11 additions & 2 deletions .github/actions/build-release-action/make-deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/bin/sh
set -ex
cd /github/workspace/

# workaround for debhelper bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897569
mkdir -p deb_build_home
ls | grep -v deb_build_home | xargs mv -t deb_build_home # move everything except deb_build_home
cd deb_build_home

dh_clean
dpkg-buildpackage -us -uc -nc

# set filename
release_code_name=$(lsb_release --codename | sed 's/Codename:\s*//')
package_name=$(basename ../*.deb | sed 's/.deb$//')_$release_code_name.deb
mv ../*.deb ../$package_name

mv ../*.deb $package_name
echo "::set-output name=package_name::$package_name"
# set action output
echo "::set-output name=package_name::$package_name"
12 changes: 6 additions & 6 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ jobs:
strategy:
fail-fast: false
matrix:
RELEASE:
- Ubuntu:
include:
- ubuntu: 18.04
docker_file: Dockerfile
image_version_tag: '18.04'
- Ubuntu:
- ubuntu: 20.04
docker_file: Dockerfile
image_version_tag: '20.04'

runs-on: ubuntu-latest
name: Build package defined in ${{ matrix.RELEASE.docker_file }} for tag ${{ matrix.RELEASE.image_version_tag }}
name: Build package defined in ${{ matrix.docker_file }} for tag ${{ matrix.image_version_tag }}
steps:
- uses: actions/checkout@v1
- name: Run docker build
id: build_package
uses: ./.github/actions/build-release-action
with:
docker_file: ${{ matrix.RELEASE.docker_file }}
image_version_tag: ${{ matrix.RELEASE.image_version_tag }}
docker_file: ${{ matrix.docker_file }}
image_version_tag: ${{ matrix.image_version_tag }}

- name: Release deb files
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 4dc3f40

Please sign in to comment.