Deps rcmtool #81
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-image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| - dev/* | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build-docker-base-images: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| image: | |
| - name: biocma_omp_base | |
| context: ./devutils/docker | |
| dockerfile: ./devutils/docker/Dockerfile.omp-base | |
| tag: biocma_omp_base:latest | |
| output: /tmp/biocma_omp_base.tar | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Checkout RCMTool | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Benncs/rcmtool | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| path: subprojects/rcmtool | |
| ref: v1.3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Build Docker image (${{ matrix.image.name }}) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ${{ matrix.image.context }} | |
| file: ${{ matrix.image.dockerfile }} | |
| tags: ${{ matrix.image.tag }} | |
| outputs: type=docker,dest=${{ matrix.image.output }} | |
| - name: Save Docker image as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.image.name }} | |
| path: ${{ matrix.image.output }} | |
| build-docker-dependent-image: | |
| runs-on: ubuntu-latest | |
| needs: build-docker-base-images | |
| steps: | |
| - uses: actions/checkout@v1 | |
| with: | |
| repository: Benncs/rcmtool.git | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Clone GitHub submodule | |
| run: | | |
| git clone --branch v1.3 https://github.com/Benncs/rcmtool.git subprojects/rcmtool | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Download Docker base image artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: biocma_omp_base | |
| path: /tmp | |
| - name: Load Docker base image | |
| run: docker load --input /tmp/biocma_omp_base.tar | |
| - name: Build Docker image | |
| run: docker build -t biocma_omp -f ./devutils/docker/Dockerfile.omp-rls . | |
| - name: Save Docker image | |
| run: docker save biocma_omp -o /tmp/biocma_omp.tar | |
| - name: Save Docker image as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: biocma_omp | |
| path: /tmp/biocma_omp.tar | |