Install scan-build and gcc cross-compilation dependencies (#86) #2
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 Docker images | |
on: | |
push: | |
branches: 'main' | |
jobs: | |
ubuntu-arm64: | |
strategy: | |
matrix: | |
distro: | |
- focal | |
- jammy | |
- latest | |
runs-on: oqs-arm64 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push arm64 tag | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
build-args: ARCH=arm64 | |
tags: openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-arm64 | |
context: ubuntu-${{ matrix.distro }} | |
ubuntu-x86_64: | |
needs: ubuntu-arm64 | |
strategy: | |
matrix: | |
distro: | |
- focal | |
- jammy | |
- latest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
if: github.ref_name == 'main' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push x86_64 tag | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
build-args: ARCH=x86_64 | |
tags: openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-x86_64 | |
context: ubuntu-${{ matrix.distro }} | |
- name: Create multiarch image | |
run: | | |
docker manifest create openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest \ | |
--amend openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-x86_64 \ | |
--amend openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-arm64 \ | |
&& docker manifest push openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest |