Skip to content

Commit

Permalink
fix: github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kvendingoldo committed Jul 25, 2024
1 parent 8b428b4 commit 1f22598
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
@@ -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}!"

0 comments on commit 1f22598

Please sign in to comment.