diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 318a42e..d558c37 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -63,6 +63,7 @@ jobs: - name: Release uses: softprops/action-gh-release@v1 with: + prerelease: true files: | ${{ env.ASSET }} diff --git a/release-docker.sh b/release-docker.sh index 4df54d9..5abba67 100644 --- a/release-docker.sh +++ b/release-docker.sh @@ -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 \ No newline at end of file