Skip to content

Commit

Permalink
Free up space for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed May 28, 2024
1 parent 5be66d1 commit 88c8a52
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Extract metadata (tags, labels) for Docker

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
Expand All @@ -38,8 +38,11 @@ jobs:
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Build and push
- name: Create folder models
run: mkdir -p models

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
with:
python-version: '3.11'

- name: Free up space
run: make free_up_space

- name: Install venv
run: make install_venv

Expand Down
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,21 @@ stop:
docker compose stop

test:
. .venv/bin/activate; command cd src; command python -m pytest
. .venv/bin/activate; command cd src; command python -m pytest

free_up_space:
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get remove -y '^llvm-.*' || true
sudo apt-get remove -y 'php.*' || true
sudo apt-get remove -y google-cloud-sdk hhvm google-chrome-stable firefox mono-devel || true
sudo apt-get autoremove -y
sudo apt-get clean
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
df -h

0 comments on commit 88c8a52

Please sign in to comment.