Merge pull request #24 from Alireza-Lashkaripour/main #7
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 and Push Multi-Platform Docker Image | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Build and Push Docker Image | |
run: | | |
docker buildx build \ | |
--platform linux/amd64 \ | |
--push \ | |
--tag openqp/openqp:v1.0 \ | |
--tag openqp/openqp:v1.0 \ | |
. | |
- name: Verify Docker Image | |
run: | | |
docker pull openqp/openqp:v1.0 | |
docker inspect openqp/openqp:v1.0 |