Build Docker Images #329
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
# SPDX-FileCopyrightText: 2021-2024 The Ikarus Developers [email protected] | |
# SPDX-License-Identifier: CC0-1.0 | |
name: Build Docker Images | |
on: | |
workflow_run: | |
workflows: ["Debian"] | |
branches: [main] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
build-docker-debian: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'ikarus-project/ikarus-docker-container' | |
path: 'repo' | |
- name: Build the Docker image | |
working-directory: ./repo/InstalledContainer | |
run: | | |
docker build . --file Dockerfile --tag ikarusproject/ikarus-gcc:latest --build-arg compiler="gcc" --build-arg ccompiler="gcc-12" --build-arg cppcompiler="g++-12" | |
docker build . --file Dockerfile --tag ikarusproject/ikarus-clang:latest --build-arg compiler="clang" --build-arg ccompiler="clang-16" --build-arg cppcompiler="clang++-16" | |
docker tag ikarusproject/ikarus-gcc:latest ikarusproject/ikarus:latest | |
- name: Docker Login | |
uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Publish the Docker image | |
working-directory: ./repo/InstalledContainer | |
run: | | |
docker push ikarusproject/ikarus-gcc:latest | |
docker push ikarusproject/ikarus-clang:latest | |
docker push ikarusproject/ikarus:latest |