Try to add CI/CD

This commit is contained in:
Ivan Fonarev 2023-10-27 21:50:49 +03:00
parent 17f3663a9b
commit 5c5316eb37
2 changed files with 36 additions and 0 deletions

27
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,27 @@
# Is performed before the scripts in the stages step
tags:
- selfhosted-1
before_script:
- source /etc/profile
# Defines stages which are to be executed
stages:
- build
# Stage "build"
run-build:
stage: build
script:
- apt install -y build-essential dh-make devscripts
- dpkg-buildpackage -us -uc
- mkdir build
- mv ../* build/
# This stage is only executed for new tags
only:
- tags
# The files which are to be made available in GitLab
artifacts:
paths:
- build/*

9
Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM debian:bookworm
WORKDIR /app
COPY . /app
RUN apt update
RUN apt install -y git dh-make build-essential autoconf autotools-dev
RUN apt-get clean autoclean
RUN apt-get autoremove --yes
RUN rm -rf /var/lib/{apt,dpkg,cache,log}/