chore: pi harness in openenv #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: GHCR — Build & Push Images | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "spaces/**" | |
| - "scripts/prepare_hf_space.py" | |
| - ".github/workflows/sync-hf-spaces.yml" | |
| - ".github/workflows/validate-spaces.yml" | |
| - ".github/workflows/check-space-file-size.yml" | |
| - "**/*.md" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ghcr-build-push | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| base: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| sha_tag: ${{ steps.meta.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/${{ github.repository }}/openenv-base | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=sha,prefix=sha-,format=short | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: docker/Dockerfile.base | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/openenv-base:latest | |
| cache-to: type=inline | |
| task: | |
| needs: base | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| task: | |
| - name: notebook | |
| dockerfile: docker/Dockerfile.notebook | |
| - name: postgres | |
| dockerfile: docker/Dockerfile.pg | |
| - name: dependent-type-checker | |
| dockerfile: docker/Dockerfile.dependent-type-checker | |
| - name: libexpat-to-x86asm | |
| dockerfile: docker/Dockerfile.libexpat-to-x86asm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/${{ github.repository }}/frontier-swe-${{ matrix.task.name }} | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=sha,prefix=sha-,format=short | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ${{ matrix.task.dockerfile }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| BASE_IMAGE=ghcr.io/${{ github.repository }}/openenv-base:${{ needs.base.outputs.sha_tag }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/frontier-swe-${{ matrix.task.name }}:latest | |
| cache-to: type=inline |