Skip to content
Merged
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Auto Approve

on:
workflow_run:
workflows: [Tests]
workflows: [Tests]
types: [completed]

jobs:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- test
if: always() && needs.test.result == 'success'
if: always() && needs.test.result == 'success' && github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v5
Expand All @@ -77,7 +77,9 @@ jobs:
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git remote add gitlab https://gitlab.com/dk-raas/dkai/high-command/high-command-api.git || true
git remote remove gitlab 2>/dev/null || true
git remote add gitlab https://gitlab.com/dk-raas/dkai/high-command/high-command-api.git
git config credential.helper '!f() { echo "username=oauth2"; echo "password=${GITLAB_TOKEN}"; }; f'
git fetch gitlab main || true
git push gitlab HEAD:main || echo "GitLab push failed"
git fetch gitlab main
git pull gitlab main --no-edit
git push gitlab HEAD:main
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ version: '3.8'

services:
api:
image: harbor.dataknife.net/library/high-command-api:latest
build:
context: .
dockerfile: Dockerfile
image: high-command-api:latest
# Alternative: Use Harbor image for production deployments
# image: harbor.dataknife.net/library/high-command-api:latest
ports:
- "5000:5000"
environment:
Expand Down