Feature/statistics #147
Workflow file for this run
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 Push Docker Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| IMAGE_NAME: fabnemepfl/mmirage | |
| REGISTRY: docker.io | |
| jobs: | |
| build-docker: | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - platform: ubuntu-latest | |
| path: docker/Dockerfile | |
| tag_base: amd64 | |
| name: mmirage-git | |
| - platform: ubuntu-24.04-arm | |
| path: docker/Dockerfile | |
| tag_base: arm64 | |
| name: mmirage-git | |
| runs-on: ${{ matrix.platform }} | |
| environment: docker | |
| steps: | |
| - name: Free space (ARM) | |
| if: matrix.platform == 'ubuntu-24.04-arm' | |
| run: | | |
| df -h | |
| du -h -d1 /home/runner || true | |
| rm -rf /opt/hostedtoolcache | |
| rm -rf /home/runner/.cache | |
| rm -rf /home/runner/.docker | |
| rm -rf /home/runner/actions-runner/_work/_tool | |
| df -h | |
| - name: Free disk space | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: true | |
| docker-images: true | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| swap-storage: true | |
| - name: Check free space | |
| run: df -h | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Log in to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ${{ matrix.path }} | |
| push: true | |
| tags: | | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.name }}:latest-${{ matrix.tag_base }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.name }}:${{ github.sha }}-${{ matrix.tag_base }} |