try to deliver deb12 packages

This commit is contained in:
Paul Oureib 2024-01-12 14:11:40 +01:00
parent 6efe9ebcd4
commit e9899a4b22
3 changed files with 64 additions and 0 deletions

View File

@ -53,6 +53,11 @@ runs:
if [ "${{ inputs.package_extension }}" = "rpm" ]; then
export DIST=".${{ inputs.distrib }}"
else
if [ "${{ inputs.stability }}" = "unstable" ] || [ "${{ inputs.stability }}" = "canary" ]; then
export RELEASE="$RELEASE-${{ inputs.distrib }}"
elif [ "${{ inputs.stability }}" = "testing" ]; then
export RELEASE="${{ inputs.distrib }}"
fi
export DIST=""
fi
@ -64,6 +69,9 @@ runs:
DIRNAME=$(dirname $FILE)
BASENAME=$(basename $FILE)
cd $DIRNAME
if [ -f $DIRNAME/env/.env.${{ inputs.distrib }} ]; then
source $DIRNAME/env/.env.${{ inputs.distrib }}
fi
sed -i "s/@COMMIT_HASH@/${{ inputs.commit_hash }}/g" $BASENAME
nfpm package --config $BASENAME --packager ${{ inputs.package_extension }}
cd -

View File

@ -0,0 +1,52 @@
ARG REGISTRY_URL
FROM ${REGISTRY_URL}/debian:bookworm
ENV DEBIAN_FRONTEND noninteractive
# fix locale
RUN bash -e <<EOF
apt-get update
apt-get install -y locales
rm -rf /var/lib/apt/lists/*
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
apt-get clean
EOF
ENV LANG en_US.utf8
RUN bash -e <<EOF
apt-get update
apt-get install -y \
dh-make \
aptitude \
ca-certificates \
libssh-dev \
lintian \
pbuilder \
quilt \
git-buildpackage \
debmake \
devscripts \
fakeroot \
curl \
gcc \
git \
python3 \
libjson-perl \
libapp-fatpacker-perl \
libfile-copy-recursive-perl \
jq \
zstd
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
apt-get install -y nfpm
apt-get clean
EOF

View File

@ -129,6 +129,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
- package_extension: deb
image: packaging-plugins-bookworm
distrib: bookworm
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
@ -225,6 +228,7 @@ jobs:
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
deliver:
needs: [get-environment, package]