Skip to content

Commit

Permalink
attempt to install docker/setup-qemu-action automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Jun 16, 2024
1 parent 3a88a56 commit af715d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ runs:
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}

# TODO should detect if qemu is needed based on current vs target platform
- uses: docker/setup-qemu-action@v3
if: inputs.platforms != ''

- run: entrypoint.sh
shell: bash
env:
Expand Down
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ if [ -n "${INPUT_ENV}" ]; then
done
fi

echo "Executing Nixpacks build command:"
echo "$BUILD_CMD"

if [ -n "${INPUT_PLATFORMS}" ]; then
read -ra PLATFORMS <<< "$(echo "$INPUT_PLATFORMS" | tr ',\n' ' ')"
fi
Expand All @@ -79,6 +76,9 @@ elif [ -n "$PLATFORMS" ]; then
BUILD_CMD="$BUILD_CMD --platform ${PLATFORMS[0]}"
fi

echo "Executing Nixpacks build command:"
echo "$BUILD_CMD"

eval "$BUILD_CMD"

# Conditionally push the images based on the 'push' input
Expand Down

0 comments on commit af715d3

Please sign in to comment.