From c4a45291c6ea324d300e6540b9e30f09ea6081f3 Mon Sep 17 00:00:00 2001 From: Tommie Gannert Date: Sun, 30 Jul 2023 15:10:22 +0200 Subject: [PATCH] Ignores DEBs that are already in the repo. This is needed when adding architectures for an existing version. --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03aa21f..7c9fc70 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -332,9 +332,14 @@ jobs: arch=${codename##* } arch=${arch%%/*} codename=${codename% *} - reprepro -A "$arch" --export=silent-never -b debian includedeb "$codename" "$path" - codenames+=( "$codename" ) - archs+=( "$arch" ) + name="$(dpkg-deb --field "$path" package)" + if [ ! -e "debian/pool/contrib/i/$name/$(basename "$path")" ]; then + reprepro -A "$arch" --export=silent-never -b debian includedeb "$codename" "$path" + codenames+=( "$codename" ) + archs+=( "$arch" ) + else + echo 'Package $name already exists. Silently ignored.' + fi done (IFS=$'\n' ; echo "codenames=$(echo "${codenames[*]}" | sort -u | xargs -r)" >>"$GITHUB_OUTPUT") (IFS=$'\n' ; echo "archs=$(echo "${archs[*]}" | sort -u | xargs -r)" >>"$GITHUB_OUTPUT")