mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-10 00:00:24 +03:00
Merge pull request #452 from LebedevRI/debian
Debian PPA: switch to aptly
This commit is contained in:
commit
9a68580a53
67
.github/workflows/deb-publish.yml
vendored
67
.github/workflows/deb-publish.yml
vendored
@ -108,13 +108,13 @@ jobs:
|
|||||||
apt install eatmydata
|
apt install eatmydata
|
||||||
eatmydata apt full-upgrade
|
eatmydata apt full-upgrade
|
||||||
eatmydata apt install \
|
eatmydata apt install \
|
||||||
|
aptly \
|
||||||
devscripts \
|
devscripts \
|
||||||
gettext-base \
|
gettext-base \
|
||||||
git \
|
git \
|
||||||
gnupg \
|
gnupg \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
pandoc \
|
pandoc \
|
||||||
reprepro \
|
|
||||||
sshfs \
|
sshfs \
|
||||||
tar \
|
tar \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
@ -231,10 +231,11 @@ jobs:
|
|||||||
echo '::endgroup::' \
|
echo '::endgroup::' \
|
||||||
"
|
"
|
||||||
- name: Create and populate repos
|
- name: Create and populate repos
|
||||||
timeout-minutes: 60
|
timeout-minutes: 10
|
||||||
shell: sudo podman exec --interactive --tty container eatmydata sh "{0}"
|
shell: sudo podman exec --interactive --tty container eatmydata sh "{0}"
|
||||||
run: |
|
run: |
|
||||||
set -xe
|
set -xe
|
||||||
|
SNAPSHOT_DATE=`date -u +%Y%m%d%H%M%S`
|
||||||
MOUNTPOINT="${{ github.workspace }}/remotefs"
|
MOUNTPOINT="${{ github.workspace }}/remotefs"
|
||||||
mkdir -p "$MOUNTPOINT"
|
mkdir -p "$MOUNTPOINT"
|
||||||
if [ -n "${{ secrets.SSH_HOST }}" ]; then
|
if [ -n "${{ secrets.SSH_HOST }}" ]; then
|
||||||
@ -249,50 +250,44 @@ jobs:
|
|||||||
gpg-connect-agent 'keyattr ${{ secrets.GPG_AUTH_SUBKEY_KEYGRIP }} Use-for-ssh: true' /bye
|
gpg-connect-agent 'keyattr ${{ secrets.GPG_AUTH_SUBKEY_KEYGRIP }} Use-for-ssh: true' /bye
|
||||||
sshfs ${{ secrets.SSH_HOST }}/uploads "$MOUNTPOINT"
|
sshfs ${{ secrets.SSH_HOST }}/uploads "$MOUNTPOINT"
|
||||||
fi
|
fi
|
||||||
REPO_ROOT="$MOUNTPOINT/public_html"
|
rm -f ~/.aptly.conf
|
||||||
mkdir -p "$REPO_ROOT"
|
APTLY_ROOT="$MOUNTPOINT/aptly"
|
||||||
|
PUBLIC_ROOT="$APTLY_ROOT/public"
|
||||||
|
tee -a ~/.aptly.conf <<EOT
|
||||||
|
root_dir: $APTLY_ROOT
|
||||||
|
gpg_disable_verify: false
|
||||||
|
EOT
|
||||||
|
if [ "${{ steps.gpg.conclusion }}" == "skipped" ]; then
|
||||||
|
tee -a ~/.aptly.conf <<EOT
|
||||||
|
gpg_disable_sign: true
|
||||||
|
EOT
|
||||||
|
fi
|
||||||
|
mkdir -p "$PUBLIC_ROOT"
|
||||||
if [ "${{ steps.gpg.conclusion }}" != "skipped" ]; then
|
if [ "${{ steps.gpg.conclusion }}" != "skipped" ]; then
|
||||||
cp -f /etc/apt/trusted.gpg.d/apt.bcachefs.org.asc "$REPO_ROOT"
|
cp -f /etc/apt/trusted.gpg.d/apt.bcachefs.org.asc "$PUBLIC_ROOT"
|
||||||
fi
|
fi
|
||||||
if [ "${{ (github.event_name == 'push' && github.ref_type == 'branch' && github.ref_name == 'master') && 'true' || 'false' }}" = "true" ]; then
|
if [ "${{ (github.event_name == 'push' && github.ref_type == 'branch' && github.ref_name == 'master') && 'true' || 'false' }}" = "true" ]; then
|
||||||
export GPG_SIGNING_SUBKEY_FINGERPRINT=${{ secrets.GPG_SIGNING_SUBKEY_FINGERPRINT }}
|
export GPG_SIGNING_SUBKEY_FINGERPRINT=${{ secrets.GPG_SIGNING_SUBKEY_FINGERPRINT }}
|
||||||
envsubst < "${{ github.workspace }}/bcachefs-tools/doc/apt.bcachefs.org-README.md" | \
|
envsubst < "${{ github.workspace }}/bcachefs-tools/doc/apt.bcachefs.org-README.md" | \
|
||||||
pandoc --from=markdown --to=html --output="$REPO_ROOT/.footer/README"
|
pandoc --from=markdown --to=html --output="$PUBLIC_ROOT/.footer/README"
|
||||||
fi
|
fi
|
||||||
cd "${{ github.workspace }}/incoming/bin-artifacts"
|
cd "${{ github.workspace }}/incoming/bin-artifacts"
|
||||||
for DIST in *
|
for DIST in *
|
||||||
do
|
do
|
||||||
echo "::group::Distribution $DIST"
|
echo "::group::Distribution $DIST"
|
||||||
SRCDIR="${{ github.workspace }}/incoming/bin-artifacts/$DIST"
|
REPO_NAME="$DIST-${{ env.SUITE }}"
|
||||||
cd "$SRCDIR"
|
REPO_SUITE="bcachefs-tools-${{ env.SUITE }}"
|
||||||
REPO="$REPO_ROOT/$DIST"
|
SNAPSHOT_NAME="$REPO_NAME-$SNAPSHOT_DATE"
|
||||||
mkdir -p "$REPO/conf/distributions"
|
aptly repo show $REPO_NAME &>/dev/null || \
|
||||||
tee "$REPO/conf/distributions/${{ env.SUITE }}.conf" > /dev/null <<EOT
|
aptly repo create -distribution=$REPO_SUITE -component=main $REPO_NAME
|
||||||
Codename: bcachefs-tools-${{ env.SUITE }}
|
aptly repo include -repo=$REPO_NAME \
|
||||||
Architectures: source amd64 arm64 ppc64el
|
"${{ github.workspace }}/incoming/src-artifacts" \
|
||||||
Components: main
|
"${{ github.workspace }}/incoming/bin-artifacts/$DIST" \
|
||||||
Contents:
|
;
|
||||||
Origin: apt.bcachefs.org
|
aptly snapshot create $SNAPSHOT_NAME from repo $REPO_NAME
|
||||||
Label: apt.bcachefs.org Packages
|
aptly publish show $REPO_SUITE $DIST &>/dev/null || \
|
||||||
Description: bcachefs APT repository
|
aptly publish snapshot -acquire-by-hash -origin="apt.bcachefs.org" -label="apt.bcachefs.org Packages" $SNAPSHOT_NAME $DIST
|
||||||
SignWith: ${{ secrets.GPG_SIGNING_SUBKEY_FINGERPRINT }}
|
aptly publish switch $REPO_SUITE $DIST $SNAPSHOT_NAME
|
||||||
Signed-By: ${{ secrets.GPG_SIGNING_SUBKEY_FINGERPRINT }}
|
|
||||||
Uploaders: uploaders
|
|
||||||
EOT
|
|
||||||
tee "$REPO/conf/uploaders" > /dev/null <<EOT
|
|
||||||
allow * by key ${{ secrets.GPG_SIGNING_SUBKEY_FINGERPRINT }}
|
|
||||||
EOT
|
|
||||||
tee "$REPO/conf/options" > /dev/null <<EOT
|
|
||||||
verbose
|
|
||||||
ignore longkeyid
|
|
||||||
EOT
|
|
||||||
reprepro --basedir "$REPO" --ignore=wrongdistribution include bcachefs-tools-${{ env.SUITE }} "${{ github.workspace }}/incoming/src-artifacts/"*.changes
|
|
||||||
for f in "$SRCDIR"/*/*.changes
|
|
||||||
do
|
|
||||||
reprepro --basedir "$REPO" --ignore=wrongdistribution include bcachefs-tools-${{ env.SUITE }} $f
|
|
||||||
done
|
|
||||||
reprepro --basedir "$REPO" createsymlinks
|
|
||||||
reprepro --basedir "$REPO" export
|
|
||||||
echo '::endgroup::'
|
echo '::endgroup::'
|
||||||
done
|
done
|
||||||
umount "$MOUNTPOINT" || /bin/true
|
umount "$MOUNTPOINT" || /bin/true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user