config: Update 3 files
Some checks failed
Test and Publish Templates / test-and-publish (push) Failing after 14s
Some checks failed
Test and Publish Templates / test-and-publish (push) Failing after 14s
This commit is contained in:
@@ -41,6 +41,9 @@ jobs:
|
||||
# Install tar for packaging
|
||||
which tar || sudo apt-get update && sudo apt-get install -y tar
|
||||
|
||||
# Install xxhash for calculating template hashes
|
||||
which xxhsum || sudo apt-get update && sudo apt-get install -y xxhash
|
||||
|
||||
- name: Bump versions if requested
|
||||
if: inputs.bump_version != 'none'
|
||||
run: |
|
||||
|
@@ -28,6 +28,9 @@ jobs:
|
||||
# Install tar for packaging
|
||||
which tar || sudo apt-get update && sudo apt-get install -y tar
|
||||
|
||||
# Install xxhash for calculating template hashes
|
||||
which xxhsum || sudo apt-get update && sudo apt-get install -y xxhash
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
chmod +x test.sh
|
||||
|
11
publish.sh
11
publish.sh
@@ -115,21 +115,26 @@ for TEMPLATE in $TEMPLATES_TO_PUBLISH; do
|
||||
SIZE=$(du -h "$TARBALL" | cut -f1)
|
||||
info "Created $TEMPLATE.tgz ($SIZE)"
|
||||
|
||||
# Calculate XXHash64 of the unpacked template contents
|
||||
info "Calculating XXHash64 for $TEMPLATE"
|
||||
XXHASH=$(find "$TEMPLATE" -type f -exec xxhsum -H64 {} \; | sort | xxhsum -H64 | cut -d' ' -f1)
|
||||
info "XXHash64 for $TEMPLATE: $XXHASH"
|
||||
|
||||
# Upload to templates.dropshell.app using sos
|
||||
info "Uploading $TEMPLATE to templates.dropshell.app"
|
||||
|
||||
# Always upload with :latest tag
|
||||
sos upload templates.dropshell.app "$TARBALL" "${TEMPLATE}:latest" || die "Failed to upload $TEMPLATE:latest"
|
||||
sos upload templates.dropshell.app "$TARBALL" "${TEMPLATE}:latest" --metadata "templateXXHash64=$XXHASH" || die "Failed to upload $TEMPLATE:latest"
|
||||
info "Uploaded ${TEMPLATE}:latest"
|
||||
|
||||
# Also upload with specific version tag
|
||||
sos upload templates.dropshell.app "$TARBALL" "${TEMPLATE}:${VERSION}" || die "Failed to upload $TEMPLATE:${VERSION}"
|
||||
sos upload templates.dropshell.app "$TARBALL" "${TEMPLATE}:${VERSION}" --metadata "templateXXHash64=$XXHASH" || die "Failed to upload $TEMPLATE:${VERSION}"
|
||||
info "Uploaded ${TEMPLATE}:${VERSION}"
|
||||
|
||||
# If we have a major version, also tag with major version only (e.g., v1)
|
||||
MAJOR_VERSION=$(echo "$VERSION" | cut -d. -f1)
|
||||
if [ -n "$MAJOR_VERSION" ]; then
|
||||
sos upload templates.dropshell.app "$TARBALL" "${TEMPLATE}:v${MAJOR_VERSION}" || die "Failed to upload $TEMPLATE:v${MAJOR_VERSION}"
|
||||
sos upload templates.dropshell.app "$TARBALL" "${TEMPLATE}:v${MAJOR_VERSION}" --metadata "templateXXHash64=$XXHASH" || die "Failed to upload $TEMPLATE:v${MAJOR_VERSION}"
|
||||
info "Uploaded ${TEMPLATE}:v${MAJOR_VERSION}"
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user