diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index bde5f72..0000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Issue Labeler" -on: - issues: - types: [opened] - -permissions: - issues: write - contents: read - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: github/issue-labeler@v3.4 - with: - configuration-path: .github/labeler.yml - enable-versioned-regex: 0 - repo-token: ${{ github.token }} diff --git a/bin/nixpacks_build.sh b/bin/nixpacks_build.sh new file mode 100644 index 0000000..bca77f8 --- /dev/null +++ b/bin/nixpacks_build.sh @@ -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}"