diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7fc2e6db..de954dbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,12 +82,11 @@ jobs: env: docker_registry: "ghcr.io" run: | - set -x version=${GITHUB_REF#refs/*/v} IFS='.' read -ra version_arr <<< "${version}" architectures=("amd64" "arm64" "arm" "386") - versions=("latest", "${version_arr[0]}.${version_arr[1]}", "${version}") + versions=("latest" "${version_arr[0]}.${version_arr[1]}" "${version}") for arch in "${architectures[@]}"; do for version in "${versions[@]}"; do @@ -118,7 +117,7 @@ jobs: IFS='.' read -ra version_arr <<< "${version}" architectures=("amd64" "arm64" "arm" "386") - versions=("latest", "${version_arr[0]}.${version_arr[1]}", "${version}") + versions=("latest" "${version_arr[0]}.${version_arr[1]}" "${version}") for arch in "${architectures[@]}"; do for version in "${versions[@]}"; do diff --git a/.github/workflows/test.sh b/.github/workflows/test.sh new file mode 100644 index 00000000..5f26d020 --- /dev/null +++ b/.github/workflows/test.sh @@ -0,0 +1,22 @@ + + + +version="v1.2.3" +IFS='.' read -ra version_arr <<< "${version}" + +architectures=("amd64" "arm64" "arm" "386") +versions=("latest" "${version_arr[0]}.${version_arr[1]}" "${version}") + +for arch in "${architectures[@]}"; do +for version in "${versions[@]}"; do + IMAGE="${docker_registry}/tofuutils/tenv:${version}-${arch}" + echo "Pushing ${IMAGE} ..." + #docker push ${IMAGE} + if [ ${?} -ne 0 ]; then + echo "Failed to push ${IMAGE}" + exit 1 + fi +done +done + +echo "All images pushed successfully to ${docker_registry}!"