Upgraded SpaCy to 3.8.3 #81
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: CI Build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Build Dev Image | |
run: make ci-build-dev | |
- name: Linting | |
run: make ci-lint | |
- name: Unit Test | |
run: make ci-unittest | |
docker-build-and-push: | |
needs: [build-and-test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set tags | |
id: set_tags | |
run: | | |
DOCKER_IMAGE=ghcr.io/elifesciences/spacy-keyword-extraction-api | |
VERSION="" | |
GIT_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} | |
SHORT_SHA=${GITHUB_SHA::8} | |
TIMESTAMP=`date --utc +%Y%m%d.%H%M` | |
if [[ $GITHUB_REF == refs/tags/v* ]]; then | |
VERSION=${GITHUB_REF#refs/tags/v} | |
fi | |
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then | |
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest" | |
else | |
TAGS="${DOCKER_IMAGE}_unstable:${GITHUB_SHA},${DOCKER_IMAGE}_unstable:${GIT_BRANCH}-${SHORT_SHA}-${TIMESTAMP},${DOCKER_IMAGE}_unstable:latest" | |
fi | |
echo "TAGS=${TAGS}" | |
echo "tags=${TAGS}" >> $GITHUB_OUTPUT | |
echo "VCS_REF=${GITHUB_SHA}" >> $GITHUB_OUTPUT | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push (if not PR) | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
build-args: | | |
VCS_REF=${{ steps.set_tags.outputs.VCS_REF }} | |
tags: ${{ steps.set_tags.outputs.tags }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |