Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Oceans-1876/challenger-api
Browse files Browse the repository at this point in the history
… into develop
  • Loading branch information
Rashmil-1999 committed Dec 12, 2023
2 parents fe6f85a + f106420 commit 29aa2d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fi
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV
if [ "$BRANCH" == "main" ]; then
version=$(cat package.json | grep \"version\" | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,",]//g' | tr -d '[[:space:]]')
version=$(awk -F= '/^version/ { print $2}' pyproject.toml | sed 's/[ "]//g')
tags="latest"
oldversion=""
while [ "${oldversion}" != "${version}" ]; do
Expand All @@ -52,6 +52,7 @@ jobs:
uses: elgohr/Publish-Docker-Github-Action@3.04
env:
BRANCH: ${{ env.GITHUB_BRANCH }}
VERSION: ${{ env.VERSION }}
BUILDNUMBER: ${{ github.run_number }}
GITSHA1: ${{ github.sha }}
with:
Expand All @@ -60,7 +61,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
tags: "${{ env.TAGS }}"
buildargs: BRANCH,BUILDNUMBER,GITSHA1
buildargs: BRANCH,VERSION,BUILDNUMBER,GITSHA1
dockerfile: docker/Dockerfile

- name: Deploy to prod server
Expand Down
3 changes: 2 additions & 1 deletion app/crud/crud_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def get(self, db: Session, id: Any) -> Optional[Station]:
station = cast(
Station, db.query(self.model).filter(self.model.name == id).first()
)
station.species = binomial_only(station.species)
if station:
station.species = binomial_only(station.species)
return station


Expand Down

0 comments on commit 29aa2d7

Please sign in to comment.