Build docker Images #40
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 docker Images | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: | |
| - published | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| bases: | |
| name: Base images | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| container: [centos8-base, alma9-base, ubuntu20-base, ubuntu22-base, ubuntu24-base, | |
| alma9-apptainer] | |
| steps: | |
| - name: Dump job context | |
| env: | |
| JOB_CONTEXT: ${{ toJson(job) }} | |
| run: echo "$JOB_CONTEXT" | |
| - name: Check username | |
| run: | | |
| echo ${{ vars.BOOGERT_DOCKER_USERNAME }} | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| Username: ${{ vars.BOOGERT_DOCKER_USERNAME }} | |
| password: ${{ secrets.BOOGERT_DOCKER_PASSWORD }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: bdsim/${{ matrix.container }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | |
| with: | |
| context: . | |
| file: ./dockerfiles/${{ matrix.container }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| geant4: | |
| needs: [bases] | |
| runs-on: ubuntu-latest | |
| name: Push geant4 images to docker hub | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| base: [centos8, alma9, ubuntu20, ubuntu22, ubuntu24] | |
| geant4: [g4.10.7, g4.11.0, g4.11.1, g4.11.2, g4.11.3] | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| Username: ${{ vars.BOOGERT_DOCKER_USERNAME }} | |
| password: ${{ secrets.BOOGERT_DOCKER_PASSWORD }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: bdsim/${{ matrix.base }}-${{ matrix.geant4 }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | |
| with: | |
| context: . | |
| file: ./dockerfiles/${{ matrix.base }}-${{ matrix.geant4 }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| alma9-g4-10-4: | |
| needs: [bases] | |
| name: Push Alma9 g4.10.4 docker image to Docker Hub | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| Username: ${{ vars.BOOGERT_DOCKER_USERNAME }} | |
| password: ${{ secrets.BOOGERT_DOCKER_PASSWORD }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: bdsim/alma9-g4.10.4 | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | |
| with: | |
| context: . | |
| file: ./dockerfiles/alma9-g4.10.4 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| alma9-g4-10-7jai: | |
| needs: [bases] | |
| name: Push Alma9 g4.10.7jai docker image to Docker Hub | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| Username: ${{ vars.BOOGERT_DOCKER_USERNAME }} | |
| password: ${{ secrets.BOOGERT_DOCKER_PASSWORD }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: bdsim/alma9-g4.10.7jai | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | |
| with: | |
| context: . | |
| file: ./dockerfiles/alma9-g4.10.7jai | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |