Skip to content

Commit

Permalink
update push image script
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Nov 14, 2024
1 parent 4f4b40d commit 5daff49
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions assets/docker/scripts/push_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ set -e
lib="$1"
version="$2"
# gh_username="$3"
explicit_version=1

if [ "$version" == "" ]; then
version=$(cat "$lib"/.VERSION)
explicit_version=0
fi

# push version to GHCR
docker tag bio-compose-server-"$lib":"$version" ghcr.io/biosimulators/bio-compose-server-"$lib":"$version"
docker push ghcr.io/biosimulators/bio-compose-server-"$lib":"$version"


# push newest latest to GHCR
docker tag ghcr.io/biosimulators/bio-compose-server-"$lib":"$version" ghcr.io/biosimulators/bio-compose-server-"$lib":latest
docker push ghcr.io/biosimulators/bio-compose-server-"$lib":latest
Expand All @@ -26,7 +27,9 @@ else
VERSION_FILE=./"$lib"/.VERSION
fi

echo "$version" > "$VERSION_FILE"
if [ "$explicit_version" == 1 ]; then
echo "Updating internal version of $lib with specified version."
echo "$version" > "$VERSION_FILE"
fi

# Optional: Output the new version
echo "Updated version: $version"

0 comments on commit 5daff49

Please sign in to comment.