Skip to content

Commit

Permalink
Fix docker build on Github Actions (#172)
Browse files Browse the repository at this point in the history
Avoid github action docker build to run out of space
  • Loading branch information
lfoppiano committed Feb 28, 2024
1 parent d77550b commit 5d475a8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,19 @@ jobs:
runs-on: ubuntu-latest

steps:
# - name: Maximize build disk space
# uses: easimon/maximize-build-space@v10
# with:
# root-reserve-mb: 512
# swap-size-mb: 1024
# remove-dotnet: 'true'
- name: Create more disk space
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /opt/hostedtoolcache
- uses: actions/checkout@v4
- name: Build and push
id: docker_build
Expand All @@ -51,4 +62,4 @@ jobs:
pushImage: ${{ github.event_name != 'pull_request' }}
tags: latest-develop
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: echo ${{ steps.docker_build.outputs.digest }}
9 changes: 4 additions & 5 deletions .github/workflows/ci-integration-manual.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Run integration tests manually

on:
- workflow_dispatch
- push:
branches:
- master

push:
branches:
- master
workflow_dispatch:

jobs:
build:
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ RUN ./gradlew downloadTransformers --no-daemon --info --stacktrace && rm -f /opt
WORKDIR /opt/grobid-source
RUN unzip -o /opt/grobid-source/grobid-quantities-source/build/distributions/grobid-quantities-*.zip -d grobid-quantities_distribution && mv grobid-quantities_distribution/grobid-quantities-* grobid-quantities

# Cleanup
RUN rm -rf grobid-quantities-source/.git
RUN rm -rf grobid-quantities-source/build

WORKDIR /opt

# -------------------
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ RUN ./gradlew downloadTransformers --no-daemon --info --stacktrace && rm -f /opt
WORKDIR /opt/grobid
RUN unzip -o /opt/grobid/grobid-quantities-source/build/distributions/grobid-quantities-*.zip -d grobid-quantities_distribution && mv grobid-quantities_distribution/grobid-quantities-* grobid-quantities

# Cleanup
RUN rm -rf grobid-quantities-source/.git
RUN rm -rf grobid-quantities-source/build

WORKDIR /opt

# -------------------
Expand Down

0 comments on commit 5d475a8

Please sign in to comment.