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.
32
32
33
33
** Optional** Allow empty commits, i.e. commits with no change. The default value is ` true ` .
34
34
35
+ ## ` force_push `
36
+
37
+ ** Optional** Use ` --force ` when push to the AUR. The default value is ` false ` .
38
+
35
39
### ` ssh_keyscan_types `
36
40
37
41
** 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:
28
28
description : ' Allow empty commits, i.e. commits with no change.'
29
29
required : false
30
30
default : ' true'
31
+ force_push :
32
+ description : ' Use --force when push to the AUR.'
33
+ required : false
34
+ default : ' false'
31
35
ssh_keyscan_types :
32
36
description : ' Comma-separated list of types to use when adding aur.archlinux.org to known hosts'
33
37
required : false
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ commit_email=$INPUT_COMMIT_EMAIL
9
9
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
10
10
commit_message=$INPUT_COMMIT_MESSAGE
11
11
allow_empty_commits=$INPUT_ALLOW_EMPTY_COMMITS
12
+ force_push=$INPUT_FORCE_PUSH
12
13
ssh_keyscan_types=$INPUT_SSH_KEYSCAN_TYPES
13
14
14
15
export HOME=/home/builder
@@ -62,5 +63,14 @@ false)
62
63
exit 2
63
64
;;
64
65
esac
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
66
76
echo ' ::endgroup::'
You can’t perform that action at this time.
0 commit comments