Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,24 @@ jobs:
- name: Set up Docker
uses: docker/setup-buildx-action@v3

# @TODO
# - name: Start ECR proxy
# run: /root/ecr-proxy/start.sh
- name: Load Docker images
id: docker-cache
uses: actions/cache/restore@v4
with:
path: |
~/.docker-images.tar
key: docker-cache-${{ runner.os }}

- name: Restore Docker images
if: ${{ steps.docker-cache.outputs.cache-hit }}
run: docker image load --input ~/.docker-images.tar

- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
~/.s3buildcache
key: ${{ runner.os }}-${{ github.event.pull_request.base.ref }}-s3buildcache
key: s3buildcache-${{ runner.os }}

- name: Configure system settings
run: |
Expand All @@ -56,3 +64,15 @@ jobs:

- name: Check for uncommitted changes
run: git diff-index --exit-code --ignore-space-at-eol --stat HEAD

- name: Export Docker images
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
run: docker image save --output ~/.docker-images.tar $(docker image list --format '{{ if ne .Repository "<none>" }}{{ .Repository }}{{ if ne .Tag "<none>" }}:{{ .Tag }}{{ end }}{{ else }}{{ .ID }}{{ end }}')

- name: Cache Docker images
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
uses: actions/cache/save@v4
with:
path: |
~/.docker-images.tar
key: docker-cache-${{ runner.os }}
Loading