on: workflow_call: inputs: ref: required: true type: string repo: required: true type: string env: FORCE_COLOR: 1 CLICOLOR_FORCE: 1 RUST_LOG_STYLE: always jobs: arm64-prebuild: timeout-minutes: 20 runs-on: ubuntu-24.04-arm steps: - uses: earthly/actions-setup@43211c7a0eae5344d6d79fb4aaf209c8f8866203 # v1.0.13 with: use-cache: false - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false fetch-depth: 0 ref: ${{ inputs.ref }} repository: ${{ inputs.repo }} - name: Login to GitHub Container Registry uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - name: Run build id: build run: | earthly --ci --push -P +prebuild amd64-prebuild: timeout-minutes: 20 runs-on: ubuntu-latest steps: - uses: earthly/actions-setup@43211c7a0eae5344d6d79fb4aaf209c8f8866203 # v1.0.13 with: use-cache: false # Setup repo and add caching - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false fetch-depth: 0 ref: ${{ inputs.ref }} repository: ${{ inputs.repo }} - name: Login to GitHub Container Registry uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - name: Run build id: build run: | earthly --ci --push -P +prebuild build-scripts: timeout-minutes: 60 runs-on: ubuntu-latest steps: - uses: earthly/actions-setup@43211c7a0eae5344d6d79fb4aaf209c8f8866203 # v1.0.13 with: use-cache: false - name: Set up QEMU uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false fetch-depth: 0 ref: ${{ inputs.ref }} repository: ${{ inputs.repo }} - name: Login to GitHub Container Registry uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - name: Run build id: build run: | earthly --ci --push -P +build-scripts-all build-images: permissions: packages: write timeout-minutes: 60 runs-on: ubuntu-latest needs: - arm64-prebuild - amd64-prebuild steps: - name: Maximize build space uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 - uses: earthly/actions-setup@43211c7a0eae5344d6d79fb4aaf209c8f8866203 # v1.0.13 with: use-cache: false - name: Set up QEMU uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 # Setup repo and add caching - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false fetch-depth: 0 ref: ${{ inputs.ref }} repository: ${{ inputs.repo }} - name: Login to GitHub Container Registry uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - name: Run build run: earthly --push --ci -P +build-images-all