Skip to content

Commit

Permalink
ci: fix gateway pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
snoozebaumer committed Apr 26, 2024
1 parent bc75d1c commit 6c09048
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

4 changes: 2 additions & 2 deletions wato-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)<br>`name` (string, required)<br>`challengeStatus` (enum, required) | `id` (string) |
| 2 | `/api/challenges` | PATCH | Create Challenge | `challenge` (string, required)<br>`name` (string, required)<br>`challengeStatus` (enum, required) | `id` (string) |
| 3 | `/api/challenges/:id`<br>param: `id`(string, required) | GET | Get Challenge by ID | - | `id` (string)<br>`challenge` (string)<br>`challengerId` (string)<br>`challengerName` (string)<br>`challengeeId` (string, optional)<br>`challengeeName` (string, optional)<br>`challengeStatus` (string)<br>`maxRange` (number, optional)<br>`challengerNumber` (number, optional)<br>`challengeeNumber` (number, optional) |
| 4 | `/api/challenges/:id`<br>param: `id`(string, required) | PUT | <br>Set Game number range for challenge by ID<br>**Prerequisite:**<br> challengeStatus: NEW | `maxRange` (number, required)<br>`challengeeName` (string, required) | `id` (string)<br>`challengerId` (string)<br>`challengerName` (string)<br>`challengeeId` (string, optional)<br>`challengeeName` (string, optional)<br>`challengeStatus` (string)<br>`maxRange` (number, optional)<br>`challengerNumber` (number, optional)<br>`challengeeNumber` (number, optional) |
| 5 | `/api/challenges/:id`<br>param: `id`(string, required) | PUT | Update Challenge by ID<br>**Prerequisite:**<br> challengeStatus: GUESS_TO_BE_SET | `challengeeNumber` (number, required) | `id` (string)<br>`challengerId` (string)<br>`challengerName` (string)<br>`challengeeId` (string, optional)<br>`challengeeName` (string, optional)<br>`challengeStatus` (string)<br>`maxRange` (number, optional)<br>`challengerNumber` (number, optional)<br>`challengeeNumber` (number, optional) |
Expand Down

0 comments on commit 6c09048

Please sign in to comment.