|
59 | 59 | subject-name: ghcr.io/${{ github.repository_owner }}/buildworker_x86_64 |
60 | 60 | subject-digest: ${{ steps.push.outputs.digest }} |
61 | 61 | push-to-registry: true |
| 62 | + |
| 63 | + build-i686: |
| 64 | + runs-on: ubuntu-latest |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 67 | + |
| 68 | + - name: Set up QEMU |
| 69 | + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff9c2d871b165f9253f # v3.6.0 |
| 70 | + |
| 71 | + - name: Set up Docker Buildx |
| 72 | + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
| 73 | + |
| 74 | + - name: Log in to GHCR |
| 75 | + uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 |
| 76 | + with: |
| 77 | + registry: ghcr.io |
| 78 | + username: ${{ github.actor }} |
| 79 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 80 | + |
| 81 | + - name: Extract metadata |
| 82 | + id: meta |
| 83 | + uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0 |
| 84 | + with: |
| 85 | + images: ghcr.io/${{ github.repository_owner }}/buildworker_i686 |
| 86 | + tags: | |
| 87 | + type=sha,format=long |
| 88 | + type=raw,value=latest,enable={{is_default_branch}} |
| 89 | +
|
| 90 | + - name: Build and push |
| 91 | + id: push |
| 92 | + uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0 |
| 93 | + with: |
| 94 | + context: docker |
| 95 | + file: docker/Dockerfile.i686 |
| 96 | + platforms: linux/386 |
| 97 | + push: true |
| 98 | + tags: ${{ steps.meta.outputs.tags }} |
| 99 | + labels: ${{ steps.meta.outputs.labels }} |
| 100 | + cache-from: type=gha |
| 101 | + cache-to: type=gha,mode=max |
| 102 | + provenance: true |
| 103 | + sbom: true |
| 104 | + |
| 105 | + - name: Attest build provenance |
| 106 | + uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 |
| 107 | + with: |
| 108 | + subject-name: ghcr.io/${{ github.repository_owner }}/buildworker_i686 |
| 109 | + subject-digest: ${{ steps.push.outputs.digest }} |
| 110 | + push-to-registry: true |
| 111 | + |
| 112 | + build-aarch64: |
| 113 | + runs-on: ubuntu-24.04-arm |
| 114 | + steps: |
| 115 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 116 | + |
| 117 | + - name: Set up Docker Buildx |
| 118 | + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
| 119 | + |
| 120 | + - name: Log in to GHCR |
| 121 | + uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 |
| 122 | + with: |
| 123 | + registry: ghcr.io |
| 124 | + username: ${{ github.actor }} |
| 125 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 126 | + |
| 127 | + - name: Extract metadata |
| 128 | + id: meta |
| 129 | + uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0 |
| 130 | + with: |
| 131 | + images: ghcr.io/${{ github.repository_owner }}/buildworker_aarch64 |
| 132 | + tags: | |
| 133 | + type=sha,format=long |
| 134 | + type=raw,value=latest,enable={{is_default_branch}} |
| 135 | +
|
| 136 | + - name: Build and push |
| 137 | + id: push |
| 138 | + uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0 |
| 139 | + with: |
| 140 | + context: docker |
| 141 | + file: docker/Dockerfile.aarch64 |
| 142 | + push: true |
| 143 | + tags: ${{ steps.meta.outputs.tags }} |
| 144 | + labels: ${{ steps.meta.outputs.labels }} |
| 145 | + cache-from: type=gha |
| 146 | + cache-to: type=gha,mode=max |
| 147 | + provenance: true |
| 148 | + sbom: true |
| 149 | + |
| 150 | + - name: Attest build provenance |
| 151 | + uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 |
| 152 | + with: |
| 153 | + subject-name: ghcr.io/${{ github.repository_owner }}/buildworker_aarch64 |
| 154 | + subject-digest: ${{ steps.push.outputs.digest }} |
| 155 | + push-to-registry: true |
0 commit comments