Skip to content

Commit

Permalink
sync: synced file(s) with owlebot/main
Browse files Browse the repository at this point in the history
  • Loading branch information
multirepo-manager[bot] committed Sep 5, 2023
1 parent 3221b9d commit 3d43c49
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 30 deletions.
57 changes: 33 additions & 24 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- main
paths:
- package.json
- yarn.lock
- k8s/**
- src/**
workflow_dispatch:

Expand All @@ -28,28 +30,35 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: registry.gitlab.com/owlebot/docker-registry/${{ github.event.repository.name }}:latest
deploy:
strategy:
matrix:
node-version: [18.x]
runs-on: ubuntu-latest
if: github.event.repository.name != 'main'
needs: [test, build]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: v3.12.0
- name: Install dependencies
run: yarn install
env:
CI: true
- name: Deploy to cluster
run: yarn deploy
push: true
no-cache: true
# deploy:
# strategy:
# matrix:
# node-version: [18.x]
# runs-on: ubuntu-latest
# if: github.event.repository.name != 'main'
# needs: [test, build]
# steps:
# - uses: actions/checkout@v3
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# - name: Setup Helm
# uses: azure/setup-helm@v3
# with:
# version: v3.12.0
# - name: Login to Digital Ocean
# uses: digitalocean/action-doctl@v2
# with:
# token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
# - name: Setup kubeconfig
# run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 29016237-ff37-48f0-9082-48059a81a12d
# - name: Install dependencies
# run: yarn install --network-concurrency 1
# env:
# CI: true
# - name: Deploy to cluster
# run: yarn deploy
27 changes: 25 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
# Add PRIVATE_KEY to CI as SSH_GITHUB_KEY

jobs:
lint-js:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -29,7 +29,30 @@ jobs:
known_hosts: unnecessary
key: ${{ secrets.SSH_GITHUB_KEY }}
- name: Install dependencies
run: yarn install
run: yarn install --network-concurrency 1
env:
CI: true
- name: Lint
run: yarn lint
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
continue-on-error: true
with:
known_hosts: unnecessary
key: ${{ secrets.SSH_GITHUB_KEY }}
- name: Install dependencies
run: yarn install --network-concurrency 1
env:
CI: true
- name: Lint
Expand Down
4 changes: 2 additions & 2 deletions .infisical.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"workspaceId": "64c14ce918cf3f49e88326db",
"defaultEnvironment": "",
"defaultEnvironment": "dev",
"gitBranchToEnvironmentMapping": null
}
}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ WORKDIR /app
COPY package.json ./
COPY yarn.lock ./

RUN yarn install --prod
RUN yarn install --prod --network-concurrency 1

# Stage 2: Final image with code and installed dependencies
FROM node:latest AS final
FROM node:18 AS final

WORKDIR /app

Expand Down

0 comments on commit 3d43c49

Please sign in to comment.