Skip to content

Commit

Permalink
Merge pull request #32 from fuljo/master
Browse files Browse the repository at this point in the history
Add `test_flags` input
  • Loading branch information
KSXGitHub committed Nov 14, 2022
2 parents 325b53d + acad6af commit 065b605
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Glob patterns will be expanded by bash when copying the files to the repository.

**Optional** Check that PKGBUILD could be built.

### `test_flags`

**Optional** Command line flags for makepkg to build the package (if `test` is enabled). The default flags are `--clean --cleanbuild --nodeps`.

### `commit_username`

**Required** The username to use when creating the new commit.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ inputs:
description: 'Check that PKGBUILD could be built'
required: false
default: 'false'
test_flags:
description: 'Command line flags for makepkg to build the package (if `test` is enabled)'
required: false
default: '--clean --cleanbuild --nodeps'
commit_username:
description: 'The username to use when creating the new commit'
required: true
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pkgbuild=$INPUT_PKGBUILD
assets=$INPUT_ASSETS
updpkgsums=$INPUT_UPDPKGSUMS
test=$INPUT_TEST
read -r -a test_flags <<< "$INPUT_TEST_FLAGS"
commit_username=$INPUT_COMMIT_USERNAME
commit_email=$INPUT_COMMIT_EMAIL
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
Expand Down Expand Up @@ -82,7 +83,7 @@ fi
if [ "$test" == "true" ]; then
echo '::group::Building package with makepkg'
cd /tmp/local-repo/
makepkg --clean --cleanbuild --nodeps
makepkg "${test_flags[@]}"
echo '::endgroup::'
fi

Expand Down
2 changes: 2 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -o errexit -o pipefail -o nounset
echo '::group::Creating builder user'
useradd --create-home --shell /bin/bash builder
passwd --delete builder
mkdir -p /etc/sudoers.d/
echo "builder ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/builder
echo '::endgroup::'

echo '::group::Initializing SSH directory'
Expand Down

0 comments on commit 065b605

Please sign in to comment.