fix: Added codecov token back to codecov #7
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: | |
# Publish `main` as Docker `latest` image. | |
branches: | |
- main | |
- dev | |
# Publish `v1.2.3` tags as releases. | |
tags: | |
- v* | |
env: | |
# TODO: Change variable to your image's name. | |
IMAGE_NAME_SERVER: aruna-server | |
IMAGE_NAME_PROXY: aruna-data-proxy | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build server image | |
run: docker build . --file ./components/server/Dockerfile --tag $IMAGE_NAME_SERVER | |
- name: Push server image to github 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=latest | |
echo IMAGE_ID=harbor.computational.bio.uni-giessen.de/aruna/aruna-server | |
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/aruna-server | |
docker tag $IMAGE_NAME_SERVER $HARBOR_IMAGE_ID:$VERSION | |
docker push $HARBOR_IMAGE_ID:$VERSION |