build bdsim apptainers #6
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 bdsim apptainers | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| apptainer-bdsim: | |
| name: build apptainer images from docker images | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dockerimage: [alma9-g4.10.7-bdsim, alma9-g4.11.0-bdsim, | |
| alma9-g4.11.1-bdsim, alma9-g4.11.2-bdsim, | |
| alma9-g4.11.3-bdsim] | |
| steps: | |
| - name: Dump job context | |
| env: | |
| JOB_CONTEXT: ${{ toJson(job) }} | |
| run: echo "$JOB_CONTEXT" | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| # this might remove tools that are actually needed, | |
| # if set to "true" but frees about 6 GB | |
| tool-cache: false | |
| # all of these default to true, but feel free to set to | |
| # "false" if necessary for your workflow | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| - name: Flatten bdsim containers | |
| shell: bash | |
| run: | | |
| docker pull bdsim/alma9-apptainer | |
| docker run -ti bdsim/alma9-apptainer | |
| singularity build ${{ matrix.dockerimage }}_develop.sif docker:bdsim/${{ matrix.dockerimage }}:develop | |
| - name: Create Release | |
| id: create_release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: Release ${{ github.ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| draft: false | |
| prerelease: false | |
| allowUpdates: true | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./${{ matrix.dockerimage }}_develop.sif | |
| asset_name: ${{ matrix.dockerimage }}_develop.sif |