Skip to content

Commit

Permalink
Merge pull request #251 from RMoodsTeam/226-build-and-push-nlp-docker…
Browse files Browse the repository at this point in the history
…-image---gh-action

226 build and push nlp docker image   gh action
  • Loading branch information
m-milek authored Dec 16, 2024
2 parents ff4d6ec + 98e2619 commit 524af2c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: NLP Docker Image

on:
release:
types: [published]

jobs:
docker:
runs-on: ubuntu-latest
defaults:
run:
working-directory: nlp
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build NLP image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/rmoods:nlp-${{ github.ref_name }} .
- name: Push NLP image
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/rmoods:nlp-${{ github.ref_name }}
7 changes: 3 additions & 4 deletions .github/workflows/nlp.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Python NLP
name: Python NLP Tests

on:
push:
branches: ["**"]
pull_request:
branches: ["**"]

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -19,13 +18,13 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.12"
cache: 'pip'
cache: "pip"

- name: Install NLP dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set environment variables
run: echo "NLP_API_KEY=valid_api_key" >> $GITHUB_ENV

Expand Down

0 comments on commit 524af2c

Please sign in to comment.