Skip to content

Commit

Permalink
ci: cache container images to GitHub Actions cache
Browse files Browse the repository at this point in the history
  • Loading branch information
indygreg committed Jul 20, 2023
1 parent 46afb24 commit b592ee1
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,27 @@ jobs:
with:
python-version: '3.11'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Generate Dockerfiles
run: |
./build-linux.py --make-target empty
- name: Build Image
uses: docker/build-push-action@v4
with:
context: .
file: build/${{ matrix.image }}.Dockerfile
cache-from: |
type=gha
cache-to: |
type=gha
outputs: |
type=tar,dest=build/image-${{ matrix.image }}.tar
- name: Compress Image
run: |
./build-linux.py --make-target toolchain-image-${{ matrix.image }}
zstd -v -T0 -6 --rm build/image-*.tar
- name: Upload Docker Image
Expand Down

0 comments on commit b592ee1

Please sign in to comment.