Build Docker Image dev with buildx #101
This file contains 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 dev and Push Docker image dev and dev_alpine to Docker Hub with buildx | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: latest | |
- name: Run Docker Buildx on dev | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm64,linux/arm/v7 \ | |
-f docker/Dockerfile.dev \ | |
-t luligu/matterbridge:dev \ | |
--push . | |
docker manifest inspect luligu/matterbridge:dev | |
timeout-minutes: 60 | |
- name: Run Docker Buildx on dev_alpine | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm64,linux/arm/v7 \ | |
-f docker/Dockerfile.alpine \ | |
-t luligu/matterbridge:dev_alpine \ | |
--push . | |
docker manifest inspect luligu/matterbridge:dev_alpine | |
timeout-minutes: 60 |