Skip to content

Commit 914c19d

Browse files
authored
feat: add to local.properties action (#165)
1 parent 7bca491 commit 914c19d

File tree

1 file changed

+33
-0
lines changed
  • .github/actions/utils/add-to-local-properties

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Append to local.properties
2+
description: Appends the specified input to local.properties (creates file if it doesn't exist)
3+
4+
inputs:
5+
working-directory:
6+
description: Directory in which the action will run (must contain local.properties)
7+
default: .
8+
addition:
9+
description: The text to append to `local.properties`. Can include multiple lines; each append adds to the end of the file.
10+
11+
runs:
12+
using: composite
13+
steps:
14+
- name: Append to local.properties
15+
shell: bash
16+
run: |
17+
echo "Running 'mkdir -p' for '${{inputs.working-directory}}'"
18+
mkdir -p ${{inputs.working-directory}}
19+
20+
echo "Changing dir to '${{inputs.working-directory}}'"
21+
cd ${{inputs.working-directory}}
22+
23+
echo "Touching 'local.properties'"
24+
touch local.properties
25+
26+
echo "Running 'ls -al':"
27+
ls -al
28+
29+
echo "Writing '${{inputs.addition}}' to 'local.properties'"
30+
echo -e "${{inputs.addition}}" >> local.properties
31+
32+
echo "'local.properties' contents:"
33+
cat local.properties

0 commit comments

Comments
 (0)