Install GenomicFeatures and txdbmaker #19
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 container | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'image/**' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| outputs: | |
| containers: ${{ steps.build-info.outputs.containers }} | |
| sha: ${{ steps.build-info.outputs.sha }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GH_ACTIONS_PKG_OLLIE }} | |
| - name: Build and push images | |
| id: build-info | |
| run: | | |
| # Get short commit SHA | |
| sha=$(git rev-parse --short HEAD) | |
| docker build -t ghcr.io/olliecheng/mako_main_docker:${sha} ./image | |
| docker push ghcr.io/olliecheng/mako_main_docker:${sha} | |
| echo "sha=${sha}" >> $GITHUB_OUTPUT | |
| echo "Built container with tag: ${sha}" | |
| convert-to-singularity: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| container: | |
| image: quay.io/singularity/singularity:v3.8.1 | |
| options: --privileged | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build Singularity containers | |
| run: | | |
| set -e | |
| singularity build mako_main.sif docker://ghcr.io/olliecheng/mako_main_docker:${{ needs.build.outputs.sha }} | |
| - name: Log in to GitHub Container Registry | |
| run: | | |
| echo "${{ secrets.GH_ACTIONS_PKG_OLLIE }}" | \ | |
| singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io | |
| - name: Push Singularity containers | |
| run: | | |
| set -e | |
| singularity push mako_main.sif oras://ghcr.io/olliecheng/mako_main_singularity:${{ needs.build.outputs.sha }} | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| rm -f mako_*.sif |