diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 2fc05a1..6e1f8dc 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -92,43 +92,43 @@ jobs: method: POST url: ${{ secrets.PORTAINER_WEBHOOK_STAGING }} preventFailureOnResponse: true - # classifier: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-python@v4 - # with: - # python-version: 3.11 - # - uses: docker/setup-qemu-action@v3 - # - uses: docker/setup-buildx-action@v3 + classifier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.11 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 - # - name: Install Dependencies - # run: | - # python -m pip install --upgrade pip - # pip install -r translator/requirements.txt + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r translator/requirements.txt - # - name: Login to Docker Hub - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - # - name: Build & Push Docker Staging Build - # uses: docker/build-push-action@v5 - # if: github.ref == 'refs/heads/main' - # with: - # context: ./classifier - # push: true - # tags: hicsail/gdp-flask-classifier:staging - # build-args: | - # NOCO_DB_URL=${{ secrets.NOCO_DB_URL }} - # NOCO_XC_TOKEN=${{ secrets.NOCO_XC_TOKEN }} - # LLM_URL=${{ secrets.LLM_URL }} + - name: Build & Push Docker Staging Build + uses: docker/build-push-action@v5 + if: github.ref == 'refs/heads/main' + with: + context: ./classifier + push: true + tags: hicsail/gdp-flask-classifier:staging + build-args: | + NOCO_DB_URL=${{ secrets.NOCO_DB_URL }} + NOCO_XC_TOKEN=${{ secrets.NOCO_XC_TOKEN }} + LLM_URL=${{ secrets.LLM_URL }} - # - name: Push to Staging - # uses: fjogeleit/http-request-action@v1 - # if: github.ref == 'refs/heads/main' - # with: - # method: POST - # url: ${{ secrets.PORTAINER_WEBHOOK_STAGING }} - # preventFailureOnResponse: true + - name: Push to Staging + uses: fjogeleit/http-request-action@v1 + if: github.ref == 'refs/heads/main' + with: + method: POST + url: ${{ secrets.PORTAINER_WEBHOOK_STAGING }} + preventFailureOnResponse: true