Skip to content

Commit e6d2bb1

Browse files
committed
Free up more disk space
1 parent ce374ff commit e6d2bb1

3 files changed

Lines changed: 33 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,14 @@ jobs:
6161
password: ${{ secrets.GITHUB_TOKEN }}
6262
- name: Set up Docker Buildx
6363
uses: docker/setup-buildx-action@v3
64+
- name: Free up space
65+
run: |
66+
rm -rf .git/
67+
docker system prune --force
68+
docker rmi $(docker image ls -aq) || true
69+
docker system prune --force
70+
export DEBIAN_FRONTEND="noninteractive"
71+
sudo apt-get autoremove -y
72+
sudo apt-get autoclean -y
6473
- name: Build and push toolchain
6574
run: ./scripts/build -p -g -s ${{ matrix.target }}

.github/workflows/pr.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
echo "UUID=$UUID" >> "$GITHUB_OUTPUT"
3737
docker image save ghcr.io/toltec-dev/toolchain | gzip > ${{ runner.temp }}/$UUID-toolchain.tar.gz
3838
- name: Upload artifact
39-
uses: actions/upload-artifact@v4
39+
uses: actions/upload-artifact@v4
4040
with:
4141
name: ${{ env.UUID }}-toolchain
4242
path: ${{ runner.temp }}/${{ env.UUID }}-toolchain.tar.gz
@@ -70,14 +70,14 @@ jobs:
7070
run: |
7171
pushd ${{ runner.temp }}
7272
tar xf ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz
73+
rm ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz
7374
popd
74-
rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz
7575
- name: Build and push toolchain
7676
run: ./scripts/build -g -s base -c ghcr.io/toltec-dev/toolchain=oci-layout://${{ runner.temp }}
7777
- name: Export the container
7878
run: docker image save ghcr.io/toltec-dev/base | gzip > ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz
7979
- name: Upload artifact
80-
uses: actions/upload-artifact@v4
80+
uses: actions/upload-artifact@v4
8181
with:
8282
name: ${{ needs.stage1.outputs.UUID }}-base
8383
path: ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz
@@ -111,14 +111,23 @@ jobs:
111111
run: |
112112
pushd ${{ runner.temp }}
113113
tar xf ${{ needs.stage2.outputs.UUID }}-base.tar.gz
114+
rm ${{ needs.stage2.outputs.UUID }}-base.tar.gz
114115
popd
115-
rm ${{ runner.temp }}/${{ needs.stage2.outputs.UUID }}-base.tar.gz
116+
- name: Free up space
117+
run: |
118+
rm -rf .git/
119+
docker system prune --force
120+
docker rmi $(docker image ls -aq) || true
121+
docker system prune --force
122+
export DEBIAN_FRONTEND="noninteractive"
123+
sudo apt-get autoremove -y
124+
sudo apt-get autoclean -y
116125
- name: Build and push toolchain
117126
run: ./scripts/build -g -s ${{ matrix.target }} -c ghcr.io/toltec-dev/base=oci-layout://${{ runner.temp }}
118127
- name: Export the container
119128
run: docker image save ghcr.io/toltec-dev/${{ matrix.target }} | gzip > ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-${{ matrix.target }}.tar.gz
120129
- name: Upload artifact
121-
uses: actions/upload-artifact@v4
130+
uses: actions/upload-artifact@v4
122131
with:
123132
name: ${{ needs.stage1.outputs.UUID }}-${{ matrix.target }}
124133
path: ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-${{ matrix.target }}.tar.gz

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: release
22
on:
33
push:
44
tags:
5-
- '*'
5+
- "*"
66
jobs:
77
stage1:
88
name: Stage 1
@@ -65,6 +65,15 @@ jobs:
6565
run: |
6666
VERSION="$(echo "${{ github.ref }}" | cut -d / -f 3)"
6767
echo "version=$VERSION" >> "$GITHUB_ENV"
68+
- name: Free up space
69+
run: |
70+
rm -rf .git/
71+
docker system prune --force
72+
docker rmi $(docker image ls -aq) || true
73+
docker system prune --force
74+
export DEBIAN_FRONTEND="noninteractive"
75+
sudo apt-get autoremove -y
76+
sudo apt-get autoclean -y
6877
- name: Set up Docker Buildx
6978
uses: docker/setup-buildx-action@v3
7079
- name: Build and push toolchain

0 commit comments

Comments
 (0)