update bcr-phylo + dockerfile #185
This file contains 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 | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout tags | |
run: git fetch --unshallow origin +refs/tags/*:refs/tags/* | |
- name: Set git branch variable | |
run: echo ::set-env name=BRANCH::$(git branch --show-current) | |
- name: Set git tag variable | |
run: if [ $BRANCH == "main" ];then echo ::set-env name=TAG::$(git describe --tags);else echo ::set-env name=TAG::$BRANCH;fi | |
- name: Checkout submodules | |
shell: bash | |
run: | | |
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | |
git submodule sync --recursive | |
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | |
- name: Build the Docker image | |
run: docker build . -t quay.io/matsengrp/partis:$TAG | |
# - name: Run tests in the Docker image # eh, would need to install simulation stuff to do this, and not worth it at the moment (the quick test is run at the end of the docker build above) | |
# run: docker run quay.io/matsengrp/partis:$TAG /bin/bash -c "/partis/test/test.py --run-all" |