|
| 1 | +name: Build Docker image |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: ['v*'] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build-amd: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - name: Check out the repo |
| 12 | + uses: actions/checkout@v3 |
| 13 | + |
| 14 | + - name: Extract existing image metadata |
| 15 | + id: image-meta |
| 16 | + uses: docker/metadata-action@v4 |
| 17 | + with: |
| 18 | + images: atendai/evolution-api |
| 19 | + |
| 20 | + - name: Set up Docker Buildx |
| 21 | + uses: docker/setup-buildx-action@v2 |
| 22 | + |
| 23 | + - name: Log in to Docker Hub |
| 24 | + uses: docker/login-action@v2 |
| 25 | + with: |
| 26 | + username: ${{ secrets.DOCKER_USERNAME }} |
| 27 | + password: ${{ secrets.DOCKER_PASSWORD }} |
| 28 | + |
| 29 | + - name: Build and push AMD image |
| 30 | + uses: docker/build-push-action@v4 |
| 31 | + with: |
| 32 | + context: . |
| 33 | + labels: ${{ steps.image-meta.outputs.labels }} |
| 34 | + platforms: linux/amd64 |
| 35 | + push: true |
| 36 | + |
| 37 | + build-arm: |
| 38 | + runs-on: buildjet-4vcpu-ubuntu-2204-arm |
| 39 | + steps: |
| 40 | + - name: Check out the repo |
| 41 | + uses: actions/checkout@v3 |
| 42 | + |
| 43 | + - name: Extract existing image metadata |
| 44 | + id: image-meta |
| 45 | + uses: docker/metadata-action@v4 |
| 46 | + with: |
| 47 | + images: atendai/evolution-api |
| 48 | + |
| 49 | + - name: Set up Docker Buildx |
| 50 | + uses: docker/setup-buildx-action@v2 |
| 51 | + |
| 52 | + - name: Log in to Docker Hub |
| 53 | + uses: docker/login-action@v2 |
| 54 | + with: |
| 55 | + username: ${{ secrets.DOCKER_USERNAME }} |
| 56 | + password: ${{ secrets.DOCKER_PASSWORD }} |
| 57 | + |
| 58 | + - name: Build and push ARM image |
| 59 | + uses: docker/build-push-action@v4 |
| 60 | + with: |
| 61 | + context: . |
| 62 | + labels: ${{ steps.image-meta.outputs.labels }} |
| 63 | + platforms: linux/arm64 |
| 64 | + push: true |
0 commit comments