-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Moritz Röhrich <[email protected]>
- Loading branch information
1 parent
f18f622
commit d0d1c3e
Showing
3 changed files
with
93 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
name: Cleanup Docker | ||
on: | ||
schedule: | ||
- cron: '0 1 * * 0' # Every sunday at 1 in the morning | ||
workflow_dispatch: {} | ||
|
||
# The following job exists as three sepearate copies scheduled in parralel, | ||
# because this will let the three instances of the job be exectuted on all three | ||
# runners, otherwise some runners would never see a cleanup | ||
jobs: | ||
dockergc1: | ||
runs-on: self-hosted | ||
steps: | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Context | ||
run: | | ||
docker context create builder | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
endpoint: builder | ||
|
||
- name: Docker Prune | ||
run: | | ||
docker builder prune | ||
docker system prune -a --volumes --filter "until=24h" | ||
dockergc2: | ||
runs-on: self-hosted | ||
steps: | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Context | ||
run: | | ||
docker context create builder | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
endpoint: builder | ||
|
||
- name: Docker Prune | ||
run: | | ||
docker builder prune | ||
docker system prune -a --volumes --filter "until=24h" | ||
dockergc3: | ||
runs-on: self-hosted | ||
steps: | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Context | ||
run: | | ||
docker context create builder | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
endpoint: builder | ||
|
||
- name: Docker Prune | ||
run: | | ||
docker builder prune | ||
docker system prune -a --volumes --filter "until=24h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.