-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate pre-release within release.yaml instead of release.
- Loading branch information
dssysolyatin
committed
Jul 7, 2024
1 parent
7379597
commit 5e5956a
Showing
2 changed files
with
9 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
#!/bin/bash | ||
|
||
ARCHITECTURE=$(uname -m) | ||
if [ "$ARCHITECTURE" == "aarch64" ] || [ "$ARCHITECTURE" == "arm64" ]; then | ||
|
||
else | ||
echo "The architecture is not arm64. Current architecture: $ARCHITECTURE. Please run script on arm64 machine" | ||
exit | ||
# Check if the architecture is arm64 | ||
if [ "$ARCHITECTURE" != "aarch64" ] && [ "$ARCHITECTURE" != "arm64" ]; then | ||
echo "The architecture is not arm64. Current architecture: $ARCHITECTURE. Please run the script on an arm64 machine." | ||
exit 1 | ||
fi | ||
|
||
VERSION=v$(cargo pkgid | cut -d "#" -f2) | ||
|
||
docker build -t dssysolyatin/telegram2photoprism:${VERSION}-arm64 . | ||
|
||
docker manifest create dssysolyatin/telegram2photoprism:${VERSION} \ | ||
dssysolyatin/telegram2photoprism:${VERSION}-arm64 \ | ||
dssysolyatin/telegram2photoprism:${VERSION}-amd64 | ||
docker build -t dssysolyatin/telegram2photoprism:${VERSION}-arm64 --push . | ||
|
||
docker manifest create dssysolyatin/telegram2photoprism:${VERSION} dssysolyatin/telegram2photoprism:${VERSION}-arm64 dssysolyatin/telegram2photoprism:${VERSION}-amd64 | ||
docker manifest push dssysolyatin/telegram2photoprism:${VERSION} | ||
|
||
docker manifest create dssysolyatin/telegram2photoprism:latest \ | ||
dssysolyatin/telegram2photoprism:${VERSION}-arm64 \ | ||
dssysolyatin/telegram2photoprism:${VERSION}-amd64 | ||
|
||
docker manifest rm dssysolyatin/telegram2photoprism:latest | ||
docker manifest create dssysolyatin/telegram2photoprism:latest dssysolyatin/telegram2photoprism:${VERSION}-arm64 dssysolyatin/telegram2photoprism:${VERSION}-amd64 | ||
docker manifest push dssysolyatin/telegram2photoprism:latest |