File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ GitHub Actions to publish AUR package.
3232
3333** Optional** Allow empty commits, i.e. commits with no change. The default value is ` true ` .
3434
35+ ## ` force_push `
36+
37+ ** Optional** Use ` --force ` when push to the AUR. The default value is ` false ` .
38+
3539### ` ssh_keyscan_types `
3640
3741** Optional** Comma-separated list of types to use when adding aur.archlinux.org to known hosts.
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ inputs:
2828 description : ' Allow empty commits, i.e. commits with no change.'
2929 required : false
3030 default : ' true'
31+ force_push :
32+ description : ' Use --force when push to the AUR.'
33+ required : false
34+ default : ' false'
3135 ssh_keyscan_types :
3236 description : ' Comma-separated list of types to use when adding aur.archlinux.org to known hosts'
3337 required : false
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ commit_email=$INPUT_COMMIT_EMAIL
99ssh_private_key=$INPUT_SSH_PRIVATE_KEY
1010commit_message=$INPUT_COMMIT_MESSAGE
1111allow_empty_commits=$INPUT_ALLOW_EMPTY_COMMITS
12+ force_push=$INPUT_FORCE_PUSH
1213ssh_keyscan_types=$INPUT_SSH_KEYSCAN_TYPES
1314
1415export HOME=/home/builder
@@ -62,5 +63,14 @@ false)
6263 exit 2
6364 ;;
6465esac
65- git push --force-with-lease -v aur master
66+ force_push_flag=' '
67+ case " $force_push " in
68+ true) force_push_flag=' --force' ;;
69+ false) force_push_flag=' --force-with-lease' ;;
70+ * )
71+ echo " ::error::Invalid Value: inputs.force_push is neither 'true' nor 'false': '$force_push '"
72+ exit 3
73+ ;;
74+ esac
75+ git push " $force_push_flag " -v aur master
6676echo ' ::endgroup::'
You can’t perform that action at this time.
0 commit comments