Skip to content

Commit

Permalink
Generate pre-release within release.yaml instead of release.
Browse files Browse the repository at this point in the history
  • Loading branch information
dssysolyatin committed Jul 7, 2024
1 parent 7379597 commit 5e5956a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: |
${{ env.ASSET }}
Expand Down
21 changes: 8 additions & 13 deletions release-docker.sh
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

0 comments on commit 5e5956a

Please sign in to comment.