-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node | ||
{ | ||
"name": "Node.js", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-20-bullseye", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [3000,7007], | ||
|
||
// Use 'portsAttributes' to set default properties for specific forwarded ports. | ||
// More info: https://containers.dev/implementors/json_reference/#port-attributes | ||
"portsAttributes": { | ||
"3000": { | ||
"label": "front", | ||
"onAutoForward": "notify" | ||
}, | ||
"7007": { | ||
"label": "api", | ||
"onAutoForward": "notify" | ||
} | ||
}, | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "yarn install" | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,19 @@ jobs: | |
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set Node.js | ||
uses: actions/setup-node@v3 | ||
- name: Run make ci-build in dev container | ||
uses: devcontainers/[email protected] | ||
with: | ||
node-version: 18.x | ||
- name: yarn | ||
run: yarn install --frozen-lockfile && yarn tsc && yarn build:all | ||
shell: bash | ||
# [Optional] If you have a separate workflow like the one above | ||
# to pre-build your container image, you can reference it here | ||
# to speed up your application build workflows as well! | ||
cacheFrom: ghcr.io/example/example-devcontainer | ||
push: never | ||
runCmd: | | ||
yarn install --frozen-lockfile | ||
yarn tsc | ||
yarn build:all | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
|
This file contains 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
This file contains 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