Skip to content

Commit

Permalink
🤖 Make arm64 workers use docker mirror (#2850)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Sep 10, 2024
1 parent 3f9c233 commit 78a73db
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/reusable-docker-arm-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ on:
base_image:
required: true
type: string

env:
FORCE_COLOR: 1
permissions: read-all
jobs:
build:
Expand Down Expand Up @@ -105,6 +106,21 @@ jobs:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Set local mirror
if: ${{ inputs.worker == 'ARM64' }}
run: |
# Configure earthly to use the docker mirror in CI
# https://docs.earthly.dev/ci-integration/pull-through-cache#configuring-earthly-to-use-the-cache
mkdir -p ~/.earthly/
cat << EOF > ~/.earthly/config.yml
global:
buildkit_additional_config: |
[registry."docker.io"]
mirrors = ["registry.docker-mirror.svc.cluster.local:5000"]
[registry."registry.docker-mirror.svc.cluster.local:5000"]
insecure = true
http = true
EOF
- name: Set compression for PR
if: ${{ github.event_name == 'pull_request' }}
run: |
Expand Down

0 comments on commit 78a73db

Please sign in to comment.