|
13 | 13 |
|
14 | 14 | jobs: |
15 | 15 | build: |
| 16 | + name: Build and Test |
16 | 17 | runs-on: ubuntu-22.04 |
17 | 18 |
|
18 | 19 | steps: |
@@ -50,27 +51,66 @@ jobs: |
50 | 51 | env: |
51 | 52 | GITHUB_TOKEN: ${{ secrets.GH_TKN }} |
52 | 53 |
|
| 54 | + docker_amd64: |
| 55 | + name: Build and Test for linux/amd64 |
| 56 | + runs-on: ubuntu-22.04 |
| 57 | + steps: |
| 58 | + - name: Clone repo |
| 59 | + uses: actions/checkout@v4 |
| 60 | + with: |
| 61 | + fetch-depth: 0 |
| 62 | + |
53 | 63 | # docs: https://github.com/marketplace/actions/build-and-push-docker-images |
54 | 64 | - name: Set up QEMU |
55 | 65 | uses: docker/setup-qemu-action@v3 |
| 66 | + |
| 67 | + - name: Set up Docker Buildx |
| 68 | + uses: docker/setup-buildx-action@v3 |
| 69 | + |
| 70 | + # docs: https://docs.docker.com/build/ci/github-actions/test-before-push/ |
| 71 | + - name: Build Docker image for linux/amd64 |
| 72 | + uses: docker/build-push-action@v6 |
56 | 73 | with: |
57 | | - platforms: linux/amd64,linux/arm64 |
| 74 | + push: false |
| 75 | + context: . |
| 76 | + file: Dockerfile |
| 77 | + platforms: linux/amd64 |
| 78 | + load: true |
| 79 | + tags: ${{ github.repository }}:latest |
| 80 | + |
| 81 | + - name: Run Docker tests for linux/amd64 |
| 82 | + env: |
| 83 | + GITHUB_TOKEN: ${{ secrets.GH_TKN }} |
| 84 | + run: npm run docker:test |
| 85 | + |
| 86 | + docker_arm64: |
| 87 | + name: Build and Test for linux/arm64 |
| 88 | + runs-on: ubuntu-22.04 |
| 89 | + steps: |
| 90 | + - name: Clone repo |
| 91 | + uses: actions/checkout@v4 |
| 92 | + with: |
| 93 | + fetch-depth: 0 |
| 94 | + |
| 95 | + # docs: https://github.com/marketplace/actions/build-and-push-docker-images |
| 96 | + - name: Set up QEMU |
| 97 | + uses: docker/setup-qemu-action@v3 |
58 | 98 |
|
59 | 99 | - name: Set up Docker Buildx |
60 | 100 | uses: docker/setup-buildx-action@v3 |
61 | 101 |
|
62 | 102 | # docs: https://docs.docker.com/build/ci/github-actions/test-before-push/ |
63 | | - - name: Build Docker image |
| 103 | + - name: Build Docker image for linux/arm64 |
64 | 104 | uses: docker/build-push-action@v6 |
65 | 105 | with: |
66 | 106 | push: false |
67 | 107 | context: . |
68 | 108 | file: Dockerfile |
69 | | - platforms: linux/amd64,linux/arm64 |
| 109 | + platforms: linux/arm64 |
70 | 110 | load: true |
71 | 111 | tags: ${{ github.repository }}:latest |
72 | 112 |
|
73 | | - - name: Run Docker tests |
| 113 | + - name: Run Docker tests for linux/arm64 |
74 | 114 | env: |
75 | 115 | GITHUB_TOKEN: ${{ secrets.GH_TKN }} |
76 | 116 | run: npm run docker:test |
0 commit comments