mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
Deb publish: upload all debs first, then do the slow snapshot publish stuff
This commit is contained in:
parent
476a43717e
commit
b0a5a37e58
31
.github/workflows/deb-publish.yml
vendored
31
.github/workflows/deb-publish.yml
vendored
@ -281,24 +281,45 @@ jobs:
|
||||
</body></html>
|
||||
EOT
|
||||
fi
|
||||
setup_env() {
|
||||
REPO_NAME="$DIST-${{ env.SUITE }}"
|
||||
REPO_SUITE="bcachefs-tools-${{ env.SUITE }}"
|
||||
SNAPSHOT_NAME="$REPO_NAME-$SNAPSHOT_DATE"
|
||||
PUBLISH_PREFIX="filesystem:public:$DIST"
|
||||
}
|
||||
cd "${{ github.workspace }}/incoming/bin-artifacts"
|
||||
echo "::group::Adding packages to repositories"
|
||||
for DIST in *
|
||||
do
|
||||
echo "::group::Distribution $DIST"
|
||||
REPO_NAME="$DIST-${{ env.SUITE }}"
|
||||
REPO_SUITE="bcachefs-tools-${{ env.SUITE }}"
|
||||
SNAPSHOT_NAME="$REPO_NAME-$SNAPSHOT_DATE"
|
||||
PUBLISH_PREFIX="filesystem:public:$DIST"
|
||||
echo "::group::Adding packages to repositories: $DIST"
|
||||
setup_env
|
||||
(aptly repo show $REPO_NAME > /dev/null 2>&1) || \
|
||||
aptly repo create -distribution=$REPO_SUITE -component=main $REPO_NAME
|
||||
aptly repo include -repo=$REPO_NAME -no-remove-files \
|
||||
"${{ github.workspace }}/incoming/src-artifacts" \
|
||||
"${{ github.workspace }}/incoming/bin-artifacts/$DIST" \
|
||||
;
|
||||
echo '::endgroup::'
|
||||
done
|
||||
echo '::endgroup::'
|
||||
echo "::group::Creating snapshots of repositories"
|
||||
for DIST in *
|
||||
do
|
||||
echo "::group::Creating snapshots of repositories: $DIST"
|
||||
setup_env
|
||||
aptly snapshot create $SNAPSHOT_NAME from repo $REPO_NAME
|
||||
echo '::endgroup::'
|
||||
done
|
||||
echo '::endgroup::'
|
||||
echo "::group::Publishing repository snapshots"
|
||||
for DIST in *
|
||||
do
|
||||
echo "::group::Publishing repository snapshots: $DIST"
|
||||
setup_env
|
||||
(aptly publish show $REPO_SUITE $PUBLISH_PREFIX > /dev/null 2>&1) || \
|
||||
aptly publish snapshot -acquire-by-hash -origin="apt.bcachefs.org" -label="apt.bcachefs.org Packages" $SNAPSHOT_NAME $PUBLISH_PREFIX
|
||||
aptly publish switch $REPO_SUITE $PUBLISH_PREFIX $SNAPSHOT_NAME
|
||||
echo '::endgroup::'
|
||||
done
|
||||
echo '::endgroup::'
|
||||
umount "$MOUNTPOINT" || /bin/true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user