Merge pull request #95 from ArunaStorage/feat/improve-upload-modal #194
Workflow file for this run
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: Docker | |
on: | |
push: | |
tags: | |
- v* | |
env: | |
IMAGE_NAME: aruna-web | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v2 | |
- name: Clean up docker | |
run: docker system prune -af | |
- name: Build image | |
run: docker build . --file Dockerfile --tag $IMAGE_NAME | |
- name: Push image to harbor registry | |
run: | | |
# Strip git ref prefix from version | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tag name | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
# Use Docker `latest` tag convention | |
[ "$VERSION" == "main" ] && VERSION="${{ github.run_number }}" | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
echo "${{ secrets.HARBORPW }}" | docker login harbor.computational.bio.uni-giessen.de -u '${{ secrets.HARBORUSER }}' --password-stdin | |
HARBOR_IMAGE_ID=harbor.computational.bio.uni-giessen.de/aruna/arunaweb | |
docker tag $IMAGE_NAME $HARBOR_IMAGE_ID:$VERSION | |
docker push $HARBOR_IMAGE_ID:$VERSION |