Skip to content

Commit

Permalink
.github/workflows/docker.yml: Use https://github.com/marketplace/acti…
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Oct 7, 2023
1 parent 700f3fa commit 3d8a4cf
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,24 +144,21 @@ jobs:
EXTRA_CONFIGURE_ARGS: --enable-fat-binary
EXTRA_SAGE_PACKAGES: ${{ inputs.extra_sage_packages }}
steps:
- name: Maximize build disk space
uses: easimon/maximize-build-space@v8
with:
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
if: inputs.free_disk_space
- name: Check out SageMath
uses: actions/checkout@v4
with:
repository: ${{ inputs.sage_repo }}
ref: ${{ inputs.sage_ref }}
fetch-depth: 10000
- name: free disk space
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt-get clean
docker rmi $(docker image ls -aq)
echo "Largest packages:"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 50
sudo apt-get --fix-broken --yes remove $(dpkg-query -f '${Package}\n' -W | grep -E '^(ghc-|google-cloud-sdk|google-chrome|firefox|mysql-server|dotnet-sdk|hhvm|mono|google-cloud-cli|microsoft-edge|azure-cli|temurin|llvm-|powershell|llvm-|r-base|postgresql)') || echo "(error ignored)"
df -h
if: inputs.free_disk_space
- name: Download upstream artifact
uses: actions/download-artifact@v3
with:
Expand All @@ -185,6 +182,11 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}

- name: Show disk space
run: |
df -h
if: inputs.free_disk_space

- name: Try to login to ghcr.io
if: inputs.docker_push_repository != ''
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
Expand Down

0 comments on commit 3d8a4cf

Please sign in to comment.