Skip to content

Commit 17ecb72

Browse files
Clean GH Actions workspace before each job
GH Actions mounts docker volumes and executes the jobs from them. For some reason it doesn't clean these volumes automatically after each run. We assume that each run happens on a clean workspace and hence there are weird consequences when this assumption is broken. One of them, for example, is failure to publish documentation to GH Pages website. To publish such a documentation, we first add the website remote to the Dotty github repo. If the remote already exists, which is the case on a dirty workspace, we get an error.
1 parent 7a4f8ad commit 17ecb72

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
container: akmetiuk/dotty:2020-02-12
1616

1717
steps:
18+
- name: Clean Workspace
19+
uses: anatoliykmetyuk/[email protected]
20+
1821
- name: Git Checkout
1922
uses: actions/checkout@v2
2023

@@ -49,6 +52,9 @@ jobs:
4952
container: akmetiuk/dotty:2020-02-12
5053

5154
steps:
55+
- name: Clean Workspace
56+
uses: anatoliykmetyuk/[email protected]
57+
5258
- name: Git Checkout
5359
uses: actions/checkout@v2
5460

@@ -83,6 +89,9 @@ jobs:
8389
container: akmetiuk/dotty:2020-02-12
8490

8591
steps:
92+
- name: Clean Workspace
93+
uses: anatoliykmetyuk/[email protected]
94+
8695
- name: Git Checkout
8796
uses: actions/checkout@v2
8897

@@ -123,6 +132,9 @@ jobs:
123132
github.event_name == 'schedule'
124133

125134
steps:
135+
- name: Clean Workspace
136+
uses: anatoliykmetyuk/[email protected]
137+
126138
- name: Git Checkout
127139
uses: actions/checkout@v2
128140

@@ -160,6 +172,9 @@ jobs:
160172
github.event_name == 'schedule'
161173

162174
steps:
175+
- name: Clean Workspace
176+
uses: anatoliykmetyuk/[email protected]
177+
163178
- name: Git Checkout
164179
uses: actions/checkout@v2
165180

@@ -202,6 +217,9 @@ jobs:
202217
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
203218

204219
steps:
220+
- name: Clean Workspace
221+
uses: anatoliykmetyuk/[email protected]
222+
205223
- name: Git Checkout
206224
uses: actions/checkout@v2
207225

@@ -242,6 +260,9 @@ jobs:
242260
# Make sure you have the write permissions to the repo: https://github.com/lampepfl/dotty-website
243261

244262
steps:
263+
- name: Clean Workspace
264+
uses: anatoliykmetyuk/[email protected]
265+
245266
- name: Git Checkout
246267
uses: actions/checkout@v2
247268

0 commit comments

Comments
 (0)