Repository navigation
PR Batch Test Deploy #4
This file contains hidden or 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: PR Batch Test Deploy | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| image_tag: | |
| description: "Image tag to reproduce with compose.release.yml" | |
| required: false | |
| default: "manual-test-hk-1-d58139060a82" | |
| type: string | |
| storage_provider: | |
| description: "Storage provider override" | |
| required: false | |
| default: "local" | |
| type: string | |
| jobs: | |
| reproduce-runtime: | |
| name: Reproduce Runtime Health | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| packages: read | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prepare release env | |
| run: | | |
| cp .env.release.example .env.release.repro | |
| sed -i "s/^SKILLHUB_VERSION=.*/SKILLHUB_VERSION=${{ inputs.image_tag }}/" .env.release.repro | |
| sed -i "s/^SKILLHUB_STORAGE_PROVIDER=.*/SKILLHUB_STORAGE_PROVIDER=${{ inputs.storage_provider }}/" .env.release.repro | |
| sed -i 's/^POSTGRES_PASSWORD=.*/POSTGRES_PASSWORD=skillhub_demo/' .env.release.repro | |
| echo '=== effective env excerpt ===' | |
| grep -E '^(SKILLHUB_VERSION|SKILLHUB_STORAGE_PROVIDER|SKILLHUB_SECURITY_SCANNER_ENABLED|BOOTSTRAP_ADMIN_ENABLED|POSTGRES_DB|POSTGRES_USER|WEB_PORT|API_PORT)=' .env.release.repro | |
| - name: Pull images | |
| run: docker compose --env-file .env.release.repro -f compose.release.yml pull | |
| - name: Start runtime and wait for health | |
| run: docker compose --env-file .env.release.repro -f compose.release.yml up -d --wait --wait-timeout 180 | |
| - name: Show compose state | |
| if: always() | |
| run: | | |
| echo '=== compose ps ===' | |
| docker compose --env-file .env.release.repro -f compose.release.yml ps | |
| echo | |
| echo '=== server inspect ===' | |
| cid=$(docker compose --env-file .env.release.repro -f compose.release.yml ps -q server) | |
| if [ -n "$cid" ]; then | |
| docker inspect "$cid" --format '{{json .State}}' | |
| fi | |
| echo | |
| echo '=== actuator health ===' | |
| curl -fsS http://127.0.0.1:8080/actuator/health || true | |
| echo | |
| echo '=== server logs ===' | |
| docker compose --env-file .env.release.repro -f compose.release.yml logs --tail 300 server || true | |
| echo | |
| echo '=== postgres logs ===' | |
| docker compose --env-file .env.release.repro -f compose.release.yml logs --tail 120 postgres || true | |
| echo | |
| echo '=== redis logs ===' | |
| docker compose --env-file .env.release.repro -f compose.release.yml logs --tail 120 redis || true | |
| echo | |
| echo '=== scanner logs ===' | |
| docker compose --env-file .env.release.repro -f compose.release.yml logs --tail 120 skill-scanner || true | |
| - name: Tear down | |
| if: always() | |
| run: docker compose --env-file .env.release.repro -f compose.release.yml down -v |