fix: build on amd64 #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and publish Docker image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| release: | |
| types: [published] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-publish-image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Log in to the ghcr.io registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v3 | |
| with: | |
| images: | | |
| ghcr.io/fuellabs/segment-proxy | |
| tags: | | |
| type=ref,event=branch | |
| type=sha,prefix= | |
| type=semver,pattern={{raw}} | |
| type=raw,value=latest | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Build and push the image to ghcr.io | |
| uses: docker/build-push-action@v6 | |
| id: publish | |
| with: | |
| context: ${{ github.workspace }} | |
| file: Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64,linux/arm64 |