Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Sep 20, 2024
1 parent 72d3957 commit aacd95c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/switch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ jobs:
do
for component in "${components[@]}"
do
[ "$component" = "${{ env.FREESWITCH_REPOSITORY_NAME }}" ] && $platform="arm64" && continue
[ "$component" = "${{ env.FREESWITCH_REPOSITORY_NAME }}" ] && [ "$platform" = "arm64" ] && continue
docker image pull ${{ secrets.ECR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }}-$platform
docker tag ${{ secrets.ECR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }}-$platform ${{ secrets.GHCR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }}-$platform
docker push ${{ secrets.GHCR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }}-$platform
Expand All @@ -239,10 +239,12 @@ jobs:
for component in "${components[@]}"
do
platform_tag="${platforms[@]}"
[ "$component" = "${{ env.FREESWITCH_REPOSITORY_NAME }}" ] && platform_tag="amd64"
source_images=$(printf "${{ secrets.GHCR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }}-%s " "$platform_tag")
docker buildx imagetools create -t ${{ secrets.GHCR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }} $source_images
if [ "$component" = "${{ env.FREESWITCH_REPOSITORY_NAME }}" ]; then
docker buildx imagetools create -t ${{ secrets.GHCR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }} "${{ secrets.GHCR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }}-amd64
else
source_images=$(printf "${{ secrets.GHCR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }}-%s " "${platforms[@]}")
docker buildx imagetools create -t ${{ secrets.GHCR_REGISTRY }}/$component:${{ env.IMAGE_ALIAS }} $source_images
fi
done
deploy:
Expand Down

0 comments on commit aacd95c

Please sign in to comment.