From 6c09048c999a431a0a16ea962c18a4c01f1d2340 Mon Sep 17 00:00:00 2001 From: Samuel Nussbaumer Date: Fri, 26 Apr 2024 16:59:02 +0200 Subject: [PATCH] ci: fix gateway pipeline --- .github/workflows/gateway.yml | 60 +++++++++++++++++------------------ wato-gateway/README.md | 4 +-- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index c2a4dba..0e9631c 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -18,43 +18,43 @@ jobs: run: working-directory: wato-gateway - permissions: - contents: read - packages: write + permissions: + contents: read + packages: write - steps: - - name: Checkout - uses: actions/checkout@v4 + steps: + - name: Checkout + uses: actions/checkout@v4 - - name: Dependencies - run: npm install + - name: Dependencies + run: npm install - - name: Lint - run: npm run lint + - name: Lint + run: npm run lint - - name: Test - run: npm test + - name: Test + run: npm test - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/gateway + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/gateway - - name: Build and push Docker image - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 - with: - context: wato-gateway - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + - name: Build and push Docker image + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + with: + context: wato-gateway + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/wato-gateway/README.md b/wato-gateway/README.md index fb047e8..cfdd7bd 100644 --- a/wato-gateway/README.md +++ b/wato-gateway/README.md @@ -25,9 +25,9 @@ this requires .env files to be present, as well as the microservices to be at `. ## API Documentation | # | Endpoint | Method | Description | Request Body | Response Body | -|---|--------------------------------------------------------| ------ |--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|---|--------------------------------------------------------|--------|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 | `/` | GET | Get API Status | - | "wato API is running." | -| 2 | `/api/challenges` | POST | Create Challenge | `challenge` (string, required)
`name` (string, required)
`challengeStatus` (enum, required) | `id` (string) | +| 2 | `/api/challenges` | PATCH | Create Challenge | `challenge` (string, required)
`name` (string, required)
`challengeStatus` (enum, required) | `id` (string) | | 3 | `/api/challenges/:id`
param: `id`(string, required) | GET | Get Challenge by ID | - | `id` (string)
`challenge` (string)
`challengerId` (string)
`challengerName` (string)
`challengeeId` (string, optional)
`challengeeName` (string, optional)
`challengeStatus` (string)
`maxRange` (number, optional)
`challengerNumber` (number, optional)
`challengeeNumber` (number, optional) | | 4 | `/api/challenges/:id`
param: `id`(string, required) | PUT |
Set Game number range for challenge by ID
**Prerequisite:**
challengeStatus: NEW | `maxRange` (number, required)
`challengeeName` (string, required) | `id` (string)
`challengerId` (string)
`challengerName` (string)
`challengeeId` (string, optional)
`challengeeName` (string, optional)
`challengeStatus` (string)
`maxRange` (number, optional)
`challengerNumber` (number, optional)
`challengeeNumber` (number, optional) | | 5 | `/api/challenges/:id`
param: `id`(string, required) | PUT | Update Challenge by ID
**Prerequisite:**
challengeStatus: GUESS_TO_BE_SET | `challengeeNumber` (number, required) | `id` (string)
`challengerId` (string)
`challengerName` (string)
`challengeeId` (string, optional)
`challengeeName` (string, optional)
`challengeStatus` (string)
`maxRange` (number, optional)
`challengerNumber` (number, optional)
`challengeeNumber` (number, optional) |