Skip to content

Commit

Permalink
feat: #12 support builds with nixpacks
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdan-shulha committed Nov 8, 2024
1 parent 3ffb58d commit 73de48c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/labeler.yml

This file was deleted.

29 changes: 29 additions & 0 deletions bin/nixpacks_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

set -e

. "$(dirname "$0")/../lib/validate.sh"
. "$(dirname "$0")/../lib/sync.sh"


check_var TARGET_DIR
check_var NIXPACKS_FILE_PATH
check_var IMAGE_NAME

# Create a temporary build directory
BUILD_DIR=$(mktemp -d)
trap 'rm -rf "$BUILD_DIR"' EXIT

function copy_files() {
cp -r "$TARGET_DIR"/* "$BUILD_DIR"
}

with_lock "${TARGET_DIR}" copy_files

# Change to the build directory
cd "$BUILD_DIR"

nixpacks build --config "$NIXPACKS_FILE_PATH" --name "$IMAGE_NAME" .

# Push the image to the registry
docker push "${IMAGE_NAME}"

0 comments on commit 73de48c

Please sign in to comment.