build bdsim apptainers #4
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 | |
| container: bdsim/alma9-apptainer | |
| 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: Flatten bdsim containers | |
| shell: bash | |
| run: 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 |