Skip to content

Commit

Permalink
Debugging action workflows (adding additional tags)
Browse files Browse the repository at this point in the history
  • Loading branch information
sepen committed Dec 30, 2024
1 parent da95cb3 commit 8134f61
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ jobs:
# Prepare required files
bash prepare-files.sh $folder || exit 1
# Get additional tags
additional_tags=""
find . -type l -exec basename {} \; | while read l; do
d=$(readlink -f $l); d=$(basename $d)
if [ "${d}" == "${folder}" ]; then
additional_tags="${additional_tags} -t sepen/crux:${l}"
fi
done
echo "Building and pushing Docker image..."
# Create and use the buildx builder instance
Expand All @@ -78,18 +87,8 @@ jobs:
--platform ${platform} \
-f "$folder/Dockerfile" \
-t sepen/crux:${{ matrix.version }}-${{ matrix.arch }}${variant_tag} \
${additional_tags} \
--push $folder
# Additional Tags
find . -type l -exec basename {} \; | while read l; do
d=$(readlink -f $l); d=$(basename $d)
if [ "${d}" == "${folder}" ]; then
echo "Tagging Docker image ($l --> $d)"
docker tag sepen/crux:${d} sepen/crux:${l}
docker push sepen/crux:${l}
fi
done
fi
else
echo "Folder for ${{ matrix.version }}-${{ matrix.variant }} does not exist. Skipping build."
Expand Down

0 comments on commit 8134f61

Please sign in to comment.