summaryrefslogtreecommitdiff
path: root/.github/workflows/docker-debian
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2020-10-25 02:08:15 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2020-10-25 02:08:15 +0300
commitbcc61dc6eb62234947dd794a80b3e084a054164a (patch)
tree5f4ae5d53f0b893de37ce985213bf2669bc7acef /.github/workflows/docker-debian
parente5b6461ea3cf49254062387c0451cc0386a12b02 (diff)
Add github workflow for debian packaging
Builds can be triggered manually (`workflow_dispatch`) and by pushing a tagged release (`v*.*.*`) - There's a plain build done in an amd64 ubuntu-latest image and tar'ed - There's an amd64 ubuntu-latest deb package - There's an amd64 debian buster deb package made in a docker container Release is defined in the RELEASE_VERSION env var in the workflow configuration but must also be changed in the debian/ metadata.
Diffstat (limited to '.github/workflows/docker-debian')
-rw-r--r--.github/workflows/docker-debian/action.yml4
-rw-r--r--.github/workflows/docker-debian/debian-dockerfile8
-rwxr-xr-x.github/workflows/docker-debian/entrypoint.sh15
3 files changed, 27 insertions, 0 deletions
diff --git a/.github/workflows/docker-debian/action.yml b/.github/workflows/docker-debian/action.yml
new file mode 100644
index 00000000..d510199b
--- /dev/null
+++ b/.github/workflows/docker-debian/action.yml
@@ -0,0 +1,4 @@
1name: 'docker'
2runs:
3 using: 'docker'
4 image: 'debian-dockerfile'
diff --git a/.github/workflows/docker-debian/debian-dockerfile b/.github/workflows/docker-debian/debian-dockerfile
new file mode 100644
index 00000000..147449a0
--- /dev/null
+++ b/.github/workflows/docker-debian/debian-dockerfile
@@ -0,0 +1,8 @@
1# Container image that runs your code
2FROM debian:buster
3
4# Copies your code file from your action repository to the filesystem path `/` of the container
5COPY entrypoint.sh /entrypoint.sh
6
7# Code file to execute when the docker container starts up (`entrypoint.sh`)
8ENTRYPOINT ["/entrypoint.sh"]
diff --git a/.github/workflows/docker-debian/entrypoint.sh b/.github/workflows/docker-debian/entrypoint.sh
new file mode 100755
index 00000000..94eb7e53
--- /dev/null
+++ b/.github/workflows/docker-debian/entrypoint.sh
@@ -0,0 +1,15 @@
1#!/bin/sh -xv
2
3apt-get update -qq -y
4apt-get install -y -qq --no-install-recommends cmake libsdl2-dev libssl-dev libpcre3-dev zlib1g-dev libunistring-dev libmpg123-dev debhelper dh-make devscripts fakeroot git build-essential
5git submodule sync
6
7git archive --format=tar.gz --prefix=lagrange-${RELEASE_VERSION}/ HEAD >lagrange-${RELEASE_VERSION}.tar.gz
8tar -xvzf lagrange-${RELEASE_VERSION}.tar.gz
9ln -s lagrange-${RELEASE_VERSION}.tar.gz lagrange_${RELEASE_VERSION}.orig.tar.gz
10cd lagrange-${RELEASE_VERSION}
11debuild
12cd ..
13mkdir -p artifacts
14mv *deb artifacts/
15