Skip to content

added ghcr build and build scripts to package.json #1

added ghcr build and build scripts to package.json

added ghcr build and build scripts to package.json #1

Workflow file for this run

name: Create and publish a Docker image
on: push
env:
REGISTRY: ghcr.io
ANGULAR_IMAGE: quanted/vb-angular
NGINX_IMAGE: quanted/vb-nginx
jobs:
build-angular:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.ANGULAR_IMAGE }}
- name: Build and push Cyanweb Angular/Node Docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
build-args: env=kube
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-nginx:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: build-angular
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.NGINX_IMAGE }}
- name: Build and push Cyanweb Nginx Docker image
uses: docker/build-push-action@v2
with:
context: .
file: docker/nginx/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: config=nginx.conf