diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..0618503 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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" +} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8793e14..0578336 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -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/ci@v0.3 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: diff --git a/.run/dev.run.xml b/.run/dev.run.xml index f7f5ea4..eaf3943 100644 --- a/.run/dev.run.xml +++ b/.run/dev.run.xml @@ -5,7 +5,7 @@