docs: enhance README with comprehensive application documentation #453
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: Docker | |
| on: [push, pull_request] | |
| env: | |
| ENVIRONMENT: test | |
| VERBOSE: true | |
| TERM: xterm | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOCKER_REGISTRY: ghcr.io | |
| DOCKER_USERNAME: ${{ github.actor }} | |
| PROJECT: s3mart | |
| DOCKER_BUILD_BASE_IMAGES: true | |
| jobs: | |
| build-docker: | |
| name: Build and Push | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Show ref | |
| run: | | |
| echo "Checking out $GITHUB_REF..." | |
| - name: Login to Registry | |
| run: | | |
| echo $GITHUB_TOKEN | docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME --password-stdin | |
| - name: Pull latest image | |
| run: | | |
| make docker-pull | |
| - name: Build Image | |
| run: | | |
| make docker-build | |
| - name: Push Image | |
| run: | | |
| make docker-push | |
| build-singularity: | |
| needs: | |
| - build-docker | |
| name: Build Singularity | |
| runs-on: ubuntu-latest | |
| container: | |
| image: quay.io/singularity/docker2singularity | |
| options: --privileged | |
| steps: | |
| - name: Login to Registry | |
| run: | | |
| echo $GITHUB_TOKEN | singularity remote login -u ${DOCKER_USERNAME} --password-stdin oras://${DOCKER_REGISTRY} | |
| - name: Build SIF File | |
| run: | | |
| DOCKER_IMAGE="${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${PROJECT}" | |
| SINGULARITY_IMAGE="$(echo -n ${DOCKER_IMAGE} | tr -c '[:alnum:].' '-').sif" | |
| docker-entrypoint.sh /docker2singularity.sh \ | |
| --name ${SINGULARITY_IMAGE} \ | |
| ${DOCKER_IMAGE} | |
| singularity push /output/${SINGULARITY_IMAGE} oras://${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${PROJECT}:singularity |