Skip to content

Commit 80dcadd

Browse files
Shurtu-galasyncapi-bot
andauthored
fix: get server-api release ready (#1838)
* chore: fix server-api release Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com> * fix: get server-api release ready Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com> * chore: add changeset for PR #1838 * fix: sonarcloud Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com> * chore: add basic unit tests Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com> * ci: ignore lefthook in action Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com> * chore: add controller tests Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com> --------- Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com> Co-authored-by: asyncapi-bot <info@asyncapi.io>
1 parent a041bb7 commit 80dcadd

32 files changed

+8611
-293
lines changed

.changeset/1838.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@asyncapi/cli': patch
3+
---
4+
5+
fix: get server-api release ready
6+
7+
- 35248ba: chore: fix server-api release
8+
9+
Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
10+
- 4dcdd02: fix: get server-api release ready
11+
12+
Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
13+
14+

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
npm-debug.log
3+
Dockerfile
4+
.dockerignore
5+
.git

.github/workflows/if-nodejs-pr-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- if: steps.packagejson.outputs.exists == 'true'
6868
name: Install dependencies
6969
shell: bash
70-
run: npm ci
70+
run: npm ci --ignore-scripts
7171
- if: steps.packagejson.outputs.exists == 'true'
7272
name: Test
7373
run: npm test --if-present
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Release Server API Image
2+
on:
3+
release:
4+
types:
5+
- published
6+
jobs:
7+
8+
publish-docker:
9+
name: Generating Docker
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Get version without v character
16+
id: version
17+
run: |
18+
VERSION=${{github.event.release.tag_name}}
19+
VERSION_WITHOUT_V=${VERSION:1}
20+
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT
21+
22+
- name: Set Up QEMU
23+
uses: docker/setup-qemu-action@v2
24+
25+
- name: Set Up Docker Buildx
26+
uses: docker/setup-buildx-action@v2
27+
28+
- name: Login to Docker Hub
29+
uses: docker/login-action@v2
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
34+
- name: Build and Push Docker Image
35+
uses: docker/build-push-action@v4
36+
with:
37+
context: .
38+
file: ./src/apps/api/Dockerfile
39+
push: true
40+
tags: |
41+
asyncapi/server-api:${{ steps.version.outputs.value }}
42+
asyncapi/server-api:latest
43+
platforms: linux/amd64,linux/arm64
44+
cache-from: type=gha
45+
cache-to: type=gha
46+
47+
- uses: meeDamian/sync-readme@82715041300710d9be7c726c9d6c683b70451087 #version 1.0.6 https://github.com/meeDamian/sync-readme/releases/tag/v1.0.6
48+
with:
49+
user: ${{secrets.DOCKER_USERNAME}}
50+
pass: ${{ secrets.DOCKER_PASSWORD }}
51+
slug: asyncapi/server-api
52+
readme: ./src/apps/api/README.md
53+
description: Server API providing official AsyncAPI tools
54+
55+
deploy-app:
56+
name: Deploy to DigitalOcean App
57+
needs: publish-docker
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Deploy to DigitalOcean App
61+
uses: digitalocean/app_action@e583e1b463e8ac378854c0a01af1de8a5afd836b
62+
with:
63+
app_name: "server-api"
64+
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
65+
images: '[{"name":"asyncapi-server-api","image":{"registry_type":"DOCKER_HUB","registry":"asyncapi","repository":"server-api","tag":"latest"}}]'

.github/workflows/release-with-changesets.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- if: steps.packagejson.outputs.exists == 'true'
6262
name: Install dependencies
6363
shell: bash
64-
run: npm ci
64+
run: npm ci --ignore-scripts
6565
- if: steps.packagejson.outputs.exists == 'true'
6666
name: Run test
6767
run: npm test --if-present
@@ -102,7 +102,7 @@ jobs:
102102
- if: steps.packagejson.outputs.exists == 'true'
103103
name: Install dependencies
104104
shell: bash
105-
run: npm ci
105+
run: npm ci --ignore-scripts
106106
- if: steps.packagejson.outputs.exists == 'true'
107107
name: Install changelog
108108
shell: bash

.github/workflows/update-docs-on-docs-commits.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
cache: 'npm'
3333
cache-dependency-path: '**/package-lock.json'
3434
- name: Install dependencies
35-
run: npm ci
35+
run: npm ci --ignore-scripts
3636
- name: Regenerate docs
3737
run: npm run generate:assets --if-present
3838
- name: Create Pull Request with updated docs

.github/workflows/upload-release-assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
shell: bash
9191
run: npm install -g npm@latest
9292
- name: Install dependencies
93-
run: npm ci
93+
run: npm ci --ignore-scripts
9494
- name: Build project
9595
shell: bash
9696
run: npm run prepublishOnly

assets/server-api.png

368 KB
Loading

deployments/apps/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.terraform
2+
terraform.tfstate
3+
terraform.tfstate.backup

deployments/apps/.terraform.lock.hcl

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)