ci(packages): Do not unconditionally publish repo when no changes are
made to other repos
This commit is contained in:
parent
4f1a1bdc93
commit
ca2e7bcf73
37
.github/workflows/packages.yml
vendored
37
.github/workflows/packages.yml
vendored
@ -254,27 +254,30 @@ jobs:
|
|||||||
# Upload file to temporary directory.
|
# Upload file to temporary directory.
|
||||||
uploaded_files=false
|
uploaded_files=false
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
for filename in $(cat debs/built_${REPOSITORY_NAME}_packages.txt | sed -E 's/(..*)/debs\/\1_\*.deb debs\/\1-static_\*.deb/g'); do
|
|
||||||
if ! aptly_upload_file "$filename"; then
|
if [ -f debs/built_${REPOSITORY_NAME}_packages.txt ]; then
|
||||||
exit 1
|
for filename in $(cat debs/built_${REPOSITORY_NAME}_packages.txt | sed -E 's/(..*)/debs\/\1_\*.deb debs\/\1-static_\*.deb/g'); do
|
||||||
fi
|
if ! aptly_upload_file "$filename"; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
uploaded_files=true
|
uploaded_files=true
|
||||||
done
|
done
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
|
|
||||||
# Publishing repository changes.
|
# Publishing repository changes.
|
||||||
if [ "$uploaded_files" = "true" ]; then
|
if [ "$uploaded_files" = "true" ]; then
|
||||||
if ! aptly_add_to_repo; then
|
if ! aptly_add_to_repo; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Usually temporary directory is deleted automatically, but in certain cases it is left.
|
# Usually temporary directory is deleted automatically, but in certain cases it is left.
|
||||||
aptly_delete_dir
|
aptly_delete_dir
|
||||||
|
|
||||||
# Final part to make changes appear in web root.
|
# Final part to make changes appear in web root.
|
||||||
if ! aptly_publish_repo; then
|
if ! aptly_publish_repo; then
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user