Skip to content

Commit

Permalink
maximize space action
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky committed Mar 13, 2024
1 parent adc9982 commit c6ed563
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Docker build and push

on:
workflow_dispatch:
pull_request:
push:
tags:
- '**'
Expand All @@ -10,6 +11,26 @@ jobs:
build-push:
runs-on: ubuntu-latest
steps:
# - name: Maximize build disk space
# uses: easimon/maximize-build-space@v10
# with:
# remove-dotnet: true
# remove-android: true
# remove-haskell: true
# remove-codeql: true
# remove-docker-images: true

- name: Resize /dev/shm
run: |
sudo mount -o remount,size=4G /dev/shm
- name: Mount /var as tmpfs
run: |
sudo rm -rf /var
sudo mkdir /var
sudo chmod 0755 /var
sudo mount -t tmpfs -o size=30G tmpfs /var
- name: Checkout
uses: actions/checkout@v4

Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/max-space.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: My build action requiring more space

on: workflow_dispatch

jobs:
build:
name: Build my artifact
runs-on: ubuntu-latest
steps:
- name: Free space before
run: |
echo "Free space before:"
df -h
- name: Maximize build disk space
uses: easimon/maximize-build-space@v10
with:
# need space in /var for Docker images
root-reserve-mb: 30000
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true

- name: Checkout
uses: actions/checkout@v3

- name: Free space after
run: |
echo "Free space after:"
df -h

0 comments on commit c6ed563

Please sign in to comment.