Skip to content

Commit 4045af8

Browse files
committed
Add test_flags input
The input sets the command-line flags provided to `makepkg` when trying to build the package (if the `test` option is enabled). The input is optional and its default value is the same as before introducing this input.
1 parent 325b53d commit 4045af8

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Glob patterns will be expanded by bash when copying the files to the repository.
2525

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

28+
### `test_flags`
29+
30+
**Optional** Command line flags for makepkg to build the package (if `test` is enabled). The default flags are `--clean --cleanbuild --nodeps`.
31+
2832
### `commit_username`
2933

3034
**Required** The username to use when creating the new commit.

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ inputs:
2323
description: 'Check that PKGBUILD could be built'
2424
required: false
2525
default: 'false'
26+
test_flags:
27+
description: 'Command line flags for makepkg to build the package (if `test` is enabled)'
28+
required: false
29+
default: '--clean --cleanbuild --nodeps'
2630
commit_username:
2731
description: 'The username to use when creating the new commit'
2832
required: true

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pkgbuild=$INPUT_PKGBUILD
88
assets=$INPUT_ASSETS
99
updpkgsums=$INPUT_UPDPKGSUMS
1010
test=$INPUT_TEST
11+
test_flags=$INPUT_TEST_FLAGS
1112
commit_username=$INPUT_COMMIT_USERNAME
1213
commit_email=$INPUT_COMMIT_EMAIL
1314
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
@@ -82,7 +83,7 @@ fi
8283
if [ "$test" == "true" ]; then
8384
echo '::group::Building package with makepkg'
8485
cd /tmp/local-repo/
85-
makepkg --clean --cleanbuild --nodeps
86+
makepkg $test_flags
8687
echo '::endgroup::'
8788
fi
8889

0 commit comments

Comments
 (0)