Skip to content

Commit 063daf7

Browse files
authored
Merge pull request #33 from susurri/run_command
feat: install the package with makepkg and run a command
2 parents 065b605 + ab00d5a commit 063daf7

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Glob patterns will be expanded by bash when copying the files to the repository.
2929

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

32+
### `post_process`
33+
34+
**Optional** A line of commands to execute after processing the package.
35+
3236
### `commit_username`
3337

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

action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ inputs:
2727
description: 'Command line flags for makepkg to build the package (if `test` is enabled)'
2828
required: false
2929
default: '--clean --cleanbuild --nodeps'
30+
post_process:
31+
description: 'A line of commands to execute after processing the package'
32+
required: false
33+
default: ''
3034
commit_username:
3135
description: 'The username to use when creating the new commit'
3236
required: true

build.sh

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ assets=$INPUT_ASSETS
99
updpkgsums=$INPUT_UPDPKGSUMS
1010
test=$INPUT_TEST
1111
read -r -a test_flags <<< "$INPUT_TEST_FLAGS"
12+
post_process=$INPUT_POST_PROCESS
1213
commit_username=$INPUT_COMMIT_USERNAME
1314
commit_email=$INPUT_COMMIT_EMAIL
1415
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
@@ -92,6 +93,13 @@ cd /tmp/local-repo
9293
makepkg --printsrcinfo >.SRCINFO
9394
echo '::endgroup::'
9495

96+
if [ -n "$post_process" ]; then
97+
echo '::group::Executing post process commands'
98+
cd /tmp/local-repo/
99+
eval "$post_process"
100+
echo '::endgroup::'
101+
fi
102+
95103
echo '::group::Committing files to the repository'
96104
if [[ -z "$assets" ]]; then
97105
# When $assets are not set, we can add just PKGBUILD and .SRCINFO

0 commit comments

Comments
 (0)