Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
GenesisDoge666 committed Dec 29, 2023
1 parent e7644f7 commit 0684274
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 7 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/develop-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Docker develop build

on:
push:
branches:
- 'develop'

jobs:
build-bvm-website-develop:
uses: TrustlessComputer/tc-github-action-templates/.github/workflows/docker-build-and-push.yaml@main
with:
DOCKER_IMAGE_NAME: bvm-website
DOCKERFILE_NAME: Dockerfile
CONCURRENCY_GROUP: docker_build_develop
RUNNER_TAG: ubuntu-latest
secrets:
GCLOUD_DEV_SERVICE_ACCOUNT_JSON: ${{ secrets.GCLOUD_DEV_SERVICE_ACCOUNT_JSON }}
14 changes: 14 additions & 0 deletions .github/workflows/docker-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Docker cache build

on:
push:
branches:
- main

jobs:
docker-cache:
uses: TrustlessComputer/tc-github-action-templates/.github/workflows/docker-build-cache.yaml@main
with:
DOCKER_IMAGE_NAME: bvm-website
DOCKERFILE_NAME: cache.Dockerfile

17 changes: 17 additions & 0 deletions .github/workflows/production-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Docker production build

on:
push:
tags:
- 'v[0-9].[0-9]+.[0-9]+'

jobs:
build-bvm-website-production:
uses: TrustlessComputer/tc-github-action-templates/.github/workflows/docker-build-and-push.yaml@main
with:
DOCKER_IMAGE_NAME: bvm-website
DOCKERFILE_NAME: Dockerfile
CONCURRENCY_GROUP: docker_build_production
RUNNER_TAG: ubuntu-latest
secrets:
GCLOUD_DEV_SERVICE_ACCOUNT_JSON: ${{ secrets.GCLOUD_DEV_SERVICE_ACCOUNT_JSON }}
17 changes: 17 additions & 0 deletions .github/workflows/staging-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Docker Alpha staging build

on:
push:
branches:
- 'staging'

jobs:
build-bvm-website-staging:
uses: TrustlessComputer/tc-github-action-templates/.github/workflows/docker-build-and-push.yaml@main
with:
DOCKER_IMAGE_NAME: bvm-website
DOCKERFILE_NAME: Dockerfile
CONCURRENCY_GROUP: docker_build_staging_alpha
RUNNER_TAG: ubuntu-latest
secrets:
GCLOUD_DEV_SERVICE_ACCOUNT_JSON: ${{ secrets.GCLOUD_DEV_SERVICE_ACCOUNT_JSON }}
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM node:18-alpine AS base
FROM node:18-bullseye AS base

# 1. Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat openssh git
RUN git config --global url."https://github".insteadOf ssh://git@github

WORKDIR /app

Expand Down
5 changes: 1 addition & 4 deletions cache.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM node:18-alpine AS base
FROM node:18-bullseye AS base

# 1. Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat openssh git
RUN git config --global url."https://github".insteadOf ssh://git@github

WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN yarn install

0 comments on commit 0684274

Please sign in to comment.