|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 'main' |
| 7 | + tags: |
| 8 | + - 'v*' |
| 9 | + pull_request: |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + name: Containers |
| 14 | + runs-on: ubuntu-latest |
| 15 | + permissions: |
| 16 | + contents: read |
| 17 | + packages: write |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + lotus-version: |
| 22 | + - v1.23.1 |
| 23 | + - v1.23.2 |
| 24 | + - v1.23.3 |
| 25 | + - v1.23.4-rc1 |
| 26 | + sector-size: |
| 27 | + - '8388608' |
| 28 | + platform: |
| 29 | + - linux/amd64,linux/arm64 |
| 30 | + steps: |
| 31 | + - name: Checkout |
| 32 | + uses: actions/checkout@v3 |
| 33 | + - name: Set up QEMU |
| 34 | + uses: docker/setup-qemu-action@v2 |
| 35 | + - name: Set up Docker Buildx |
| 36 | + uses: docker/setup-buildx-action@v2 |
| 37 | + with: |
| 38 | + platforms: ${{ matrix.platform }} |
| 39 | + - name: Log in to the Container registry |
| 40 | + uses: docker/login-action@v2 |
| 41 | + with: |
| 42 | + registry: ghcr.io |
| 43 | + username: ${{ github.actor }} |
| 44 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 45 | + - name: Extract metadata for Lotus ${{ matrix.lotus-version }} Sector Size ${{ matrix.sector-size }} |
| 46 | + id: meta |
| 47 | + uses: docker/metadata-action@v4 |
| 48 | + with: |
| 49 | + images: ghcr.io/${{ github.repository }} |
| 50 | + tags: | |
| 51 | + type=raw,value=fil-proof-params-${{ matrix.lotus-version }}-${{ matrix.sector-size }} |
| 52 | + - name: Build image for Lotus ${{ matrix.lotus-version }} Sector Size ${{ matrix.sector-size }} |
| 53 | + uses: docker/build-push-action@v4 |
| 54 | + with: |
| 55 | + context: proof-params-cache |
| 56 | + cache-from: type=gha |
| 57 | + cache-to: type=gha,mode=max |
| 58 | + push: ${{ github.event_name != 'pull_request' }} |
| 59 | + tags: ${{ steps.meta.outputs.tags }} |
| 60 | + labels: ${{ steps.meta.outputs.labels }} |
| 61 | + platforms: ${{ matrix.platform }} |
| 62 | + build-args: | |
| 63 | + LOTUS_VERSION=${{ matrix.lotus-version }} |
| 64 | + SECTOR_SIZE=${{ matrix.sector-size }} |
0 commit comments