Skip to content

Commit c8fb403

Browse files
committed
Add PR check for cleaning up database cluster dir
1 parent 1354fe5 commit c8fb403

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

.github/workflows/__cleanup-db-cluster-dir.yml

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Clean up database cluster directory"
2+
description: "The database cluster directory is cleaned up if it is not empty."
3+
operatingSystems: ["ubuntu"]
4+
versions: ["linked"]
5+
steps:
6+
- name: Add a file to the database cluster directory
7+
run: |
8+
mkdir -p "${{ runner.temp }}/customDbLocation/javascript"
9+
touch "${{ runner.temp }}/customDbLocation/javascript/a-file-to-clean-up.txt"
10+
11+
- uses: ./../action/init
12+
id: init
13+
with:
14+
build-mode: none
15+
db-location: "${{ runner.temp }}/customDbLocation"
16+
languages: javascript
17+
tools: ${{ steps.prepare-test.outputs.tools-url }}
18+
19+
- name: Validate file cleaned up
20+
run: |
21+
if [[ -f "${{ runner.temp }}/customDbLocation/javascript/a-file-to-clean-up.txt" ]]; then
22+
echo "File was not cleaned up"
23+
exit 1
24+
fi
25+
echo "File was cleaned up"

0 commit comments

Comments
 (0)