Skip to content

Commit

Permalink
Merge branch 'master' of github.com:StartUpNationLabs/spos
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsukoyachi committed Sep 16, 2024
2 parents 05067b1 + 2d886db commit e4ba5b6
Show file tree
Hide file tree
Showing 11 changed files with 143 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build
- run: npx nx affected -t lint test build --no-cloud
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -48,7 +48,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Build images'
run: INPUT_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} npx nx affected --base=$NX_BASE --head=$NX_HEAD --target=container --parallel=2
run: INPUT_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} npx nx affected --base=$NX_BASE --head=$NX_HEAD --target=container --parallel=2 --no-cloud
- name: Semantic Release
shell: bash
run: npx nx release
Expand All @@ -59,4 +59,4 @@ jobs:
shell: bash
run: |
git push && git push --tags
npx nx affected -t tag-docker
npx nx affected -t tag-docker --no-cloud
4 changes: 4 additions & 0 deletions apps/frontend-bff/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM docker.io/nginx:stable-alpine
COPY dist/apps/sample-react/ /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
39 changes: 38 additions & 1 deletion apps/frontend-bff/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,42 @@
"projectType": "application",
"tags": [],
"// targets": "to see all targets run: nx show project frontend-bff --web",
"targets": {}
"targets": {
"container": {
"executor": "@nx-tools/nx-container:build",
"dependsOn": [
"build"
],
"options": {
"engine": "docker",
"push": true,
"platforms": [
"linux/amd64",
"linux/arm64"
],
"metadata": {
"images": [
"ghcr.io/startupnationlabs/spos/frontend-bff"
],
"tags": [
"type=schedule",
"type=ref,event=branch",
"type=ref,event=tag",
"type=ref,event=pr",
"type=sha,prefix=sha-"
]
}
}
},
"tag-docker": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/frontend-bff",
"commands": [
"docker buildx imagetools create -t ghcr.io/startupnationlabs/spos/frontend-bff:$(npm pkg get version --workspaces=false | jq --raw-output '.') ghcr.io/startupnationlabs/spos/frontend-bff:$(git rev-parse --abbrev-ref HEAD)"
],
"parallel": false
}
}
}
}
8 changes: 0 additions & 8 deletions apps/frontend-bff/src/app/app.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,4 @@ describe('App', () => {
expect(baseElement).toBeTruthy();
});

it('should have a greeting as the title', () => {
const { getByText } = render(
<BrowserRouter>
<App />
</BrowserRouter>
);
expect(getByText(/Welcome frontend-bff/gi)).toBeTruthy();
});
});
4 changes: 4 additions & 0 deletions apps/frontend-workflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM docker.io/nginx:stable-alpine
COPY dist/apps/sample-react/ /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
39 changes: 38 additions & 1 deletion apps/frontend-workflow/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,42 @@
"projectType": "application",
"tags": [],
"// targets": "to see all targets run: nx show project frontend-workflow --web",
"targets": {}
"targets": {
"container": {
"executor": "@nx-tools/nx-container:build",
"dependsOn": [
"build"
],
"options": {
"engine": "docker",
"push": true,
"platforms": [
"linux/amd64",
"linux/arm64"
],
"metadata": {
"images": [
"ghcr.io/startupnationlabs/spos/frontend-workflow"
],
"tags": [
"type=schedule",
"type=ref,event=branch",
"type=ref,event=tag",
"type=ref,event=pr",
"type=sha,prefix=sha-"
]
}
}
},
"tag-docker": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/frontend-workflow",
"commands": [
"docker buildx imagetools create -t ghcr.io/startupnationlabs/spos/frontend-workflow:$(npm pkg get version --workspaces=false | jq --raw-output '.') ghcr.io/startupnationlabs/spos/frontend-workflow:$(git rev-parse --abbrev-ref HEAD)"
],
"parallel": false
}
}
}
}
24 changes: 24 additions & 0 deletions apps/sample-nestjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## 0.1.1 (2024-09-16)


### 🚀 Features

- **frontend:** add component libs and apps for frontend ([4460eba](https://github.com/StartUpNationLabs/spos/commit/4460eba))


### 🩹 Fixes

- don't use nx cloud ([19e0514](https://github.com/StartUpNationLabs/spos/commit/19e0514))

- remove nx cloud for image building ([69ef30b](https://github.com/StartUpNationLabs/spos/commit/69ef30b))

- remove nx cloud for image building ([43aef5a](https://github.com/StartUpNationLabs/spos/commit/43aef5a))

- remove nx cloud for image building ([c09f742](https://github.com/StartUpNationLabs/spos/commit/c09f742))

- remove nx cloud for image building ([9dddb24](https://github.com/StartUpNationLabs/spos/commit/9dddb24))


### ❤️ Thank You

- Apoorva Srinivas Appadoo
2 changes: 1 addition & 1 deletion apps/sample-nestjs/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "sample-nestjs",
"version": "0.0.0"
"version": "0.1.1"
}
29 changes: 29 additions & 0 deletions apps/sample-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## 0.2.6 (2024-09-16)


### 🚀 Features

- **sample-nestjs:** add build and release ([798e1fc](https://github.com/StartUpNationLabs/spos/commit/798e1fc))

- **frontend:** add component libs and apps for frontend ([4460eba](https://github.com/StartUpNationLabs/spos/commit/4460eba))


### 🩹 Fixes

- don't use nx cloud ([19e0514](https://github.com/StartUpNationLabs/spos/commit/19e0514))

- remove nx cloud for image building ([69ef30b](https://github.com/StartUpNationLabs/spos/commit/69ef30b))

- remove nx cloud for image building ([43aef5a](https://github.com/StartUpNationLabs/spos/commit/43aef5a))

- remove nx cloud for image building ([c09f742](https://github.com/StartUpNationLabs/spos/commit/c09f742))

- remove nx cloud for image building ([9dddb24](https://github.com/StartUpNationLabs/spos/commit/9dddb24))

- **sample-nestjs:** init ([e6cbcfc](https://github.com/StartUpNationLabs/spos/commit/e6cbcfc))


### ❤️ Thank You

- Apoorva Srinivas Appadoo

## 0.2.5 (2024-09-11)


Expand Down
2 changes: 1 addition & 1 deletion apps/sample-react/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "sample-react",
"version": "0.2.5"
"version": "0.2.6"
}
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"]
},
"nxCloudId": "66e20444fa7794694b5aafe5",
"neverConnectToCloud": true,
"plugins": [
{
"plugin": "@nx/vite/plugin",
Expand Down

0 comments on commit e4ba5b6

Please sign in to comment.