Merge pull request #1012 from TeamCOMPAS/naive-tides #307
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: Dockerhub Image CI | |
on: | |
push: | |
branches: [ dev ] | |
jobs: | |
release: | |
name: Build Docker image and push to DockerHub | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Log in to Dockerhub | |
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
- name: Get release version | |
run: echo "COMPAS_VERSION=$(sed -n '/const std::string VERSION_STRING/,/^$/p' ./src/changelog.h | sed 's/.*"\(.*\)"[^"]*$/\1/')" >> $GITHUB_ENV | |
- name: Print version | |
run: echo $COMPAS_VERSION | |
- name: Build and tag Docker image | |
run: docker build -t teamcompas/compas:$COMPAS_VERSION -t teamcompas/compas:latest . | |
- name: Push Docker image | |
run: | | |
docker push teamcompas/compas:$COMPAS_VERSION | |
docker push teamcompas/compas:latest |