|
11 | 11 | IMAGE_NAME: ${{ github.repository }} |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - build-and-push-image: |
| 14 | + build: |
15 | 15 | runs-on: ubuntu-latest |
16 | 16 | if: ${{ github.event.workflow_run.conclusion == 'success' }} |
17 | | - |
18 | | - permissions: |
19 | | - contents: read |
20 | | - packages: write |
21 | | - attestations: write |
22 | | - id-token: write |
23 | | - |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + platform: |
| 21 | + - linux/amd64 |
| 22 | + - linux/arm64 |
24 | 23 | steps: |
25 | 24 | - name: Checkout repository |
26 | 25 | uses: actions/checkout@v4 |
27 | 26 |
|
| 27 | + - name: Prepare |
| 28 | + run: | |
| 29 | + platform=${{ matrix.platform }} |
| 30 | + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV |
| 31 | +
|
28 | 32 | - name: Log in to the Container registry |
29 | | - uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99 |
| 33 | + uses: docker/login-action@v3 |
30 | 34 | with: |
31 | 35 | registry: ${{ env.REGISTRY }} |
32 | 36 | username: ${{ github.actor }} |
33 | 37 | password: ${{ secrets.GITHUB_TOKEN }} |
34 | 38 |
|
35 | 39 | - name: Extract metadata (tags, labels) for Docker |
36 | 40 | id: meta |
37 | | - uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 |
| 41 | + uses: docker/metadata-action@v5 |
38 | 42 | with: |
39 | 43 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
40 | 44 |
|
41 | | - - name: Sync theme submodule |
42 | | - run: git submodule sync && git submodule update --init --recursive |
| 45 | + - name: Set up QEMU |
| 46 | + uses: docker/setup-qemu-action@v3 |
| 47 | + |
| 48 | + - name: Set up Docker Buildx |
| 49 | + uses: docker/setup-buildx-action@v3 |
43 | 50 |
|
44 | 51 | - name: Build and push Docker image |
45 | 52 | id: push |
46 | | - uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 |
| 53 | + uses: docker/build-push-action@v6 |
47 | 54 | with: |
48 | 55 | context: . |
49 | 56 | push: true |
| 57 | + platforms: ${{ matrix.platform }} |
50 | 58 | tags: ${{ steps.meta.outputs.tags }} |
51 | 59 | labels: ${{ steps.meta.outputs.labels }} |
52 | 60 |
|
|
0 commit comments