-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/latest' into latest
- Loading branch information
Showing
2 changed files
with
75 additions
and
25 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,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 }} |
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 |
---|---|---|
@@ -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 | ||
``` |