Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/latest' into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Volkov committed Jul 5, 2023
2 parents 02951b1 + b0568aa commit 2a873bb
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 25 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
on:
workflow_call:
inputs:
environment:
required: false
description: Used by Skaffold and Helmfile profiles
type: string
default: staging
env-template:
required: false
description: Env template file
type: string
default: "staging"
version:
required: false
description: Env template file
type: string
default: latest
env:
APP_NAME: ${{ github.event.repository.name }}
APP_ENV: ${{ inputs.environment }}
APP_VERSION: ${{ inputs.version }}
jobs:
docker:
runs-on: self-hosted
environment: ${{ inputs.environment }}
env:
DOCKER_REPOSITORY: dcr.bndigital.dev/${{ github.event.repository.name }}
concurrency:
group: ${{ github.event.repository.name }}-docker-${{ github.ref_name }}
cancel-in-progress: true
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Generate cms .env files
uses: bn-digital/vault-env@latest
continue-on-error: true
with:
endpoint: ${{ secrets.VAULT_ENDPOINT }}
token: ${{ secrets.GH_TOKEN }}
template: packages/cms/.env.${{ env.APP_ENV }}
target: packages/cms/.env

- name: Generate website .env files
uses: bn-digital/vault-env@latest
continue-on-error: true
with:
endpoint: ${{ secrets.VAULT_ENDPOINT }}
token: ${{ secrets.GH_TOKEN }}
template: packages/website/.env.${{ inputs.env-template }}
target: packages/website/.env.production

- name: Login Docker registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY }}/${{ env.APP_NAME }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
sudo install skaffold /usr/bin/
curl -Lo container-structure-test https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64
sudo install container-structure-test /usr/bin/
- name: Build images
run: skaffold build --default-repo=${{ env.DOCKER_REPOSITORY }} --tag=${{ inputs.version }}
31 changes: 6 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,18 @@
# BN Digital Container Registry

## Contents
## Library

### Build
### Image layout and rules

#### NodeJS
### Yarn

[Dockerfile](packages/yarn/Dockerfile)

This image used for assembling NodeJS-based applications. Includes Yarn 3 cached packages from `package.json` as [@bn-digital](https://github.com/bn-digital) technology stack foundation.

### Runtime

#### HTML

[Dockerfile](packages/nodejs/Dockerfile)

```dockerfile
FROM nginx/unit:${unit_version}-minimal AS html
```

#### NodeJS
### NodeJS

[Dockerfile](packages/nodejs/Dockerfile)

```dockerfile
FROM node:${nodejs_version}-bullseye-slim AS nodejs
```
#### Docker in Docker

#### PHP

[Dockerfile](packages/nodejs/Dockerfile)
[Dockerfile](packages/dind/Dockerfile)

```dockerfile
FROM nginx/unit:${unit_version}-php${php_version} AS php
```

0 comments on commit 2a873bb

Please sign in to comment.