Skip to content

fix commend endline #271

fix commend endline

fix commend endline #271

Workflow file for this run

name: Create and publish a Docker image
on: push
env:
REGISTRY: ghcr.io
FLASK_IMAGE: USEPA/cyanweb-api
MYSQL_IMAGE: USEPA/cyanweb-db
ANGULAR_IMAGE: USEPA/cyanweb-angular
NGINX_IMAGE: USEPA/cyanweb-nginx
REDIS_IMAGE: USEPA/cyanweb-redis
jobs:
build-api:
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.FLASK_IMAGE }}
- name: Build and push Cyanweb Flask API Docker image
uses: docker/build-push-action@v2
with:
context: .
file: docker/flask/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-db:
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.MYSQL_IMAGE }}
- name: Build and push Cyanweb MySQL Docker image
uses: docker/build-push-action@v2
with:
context: .
file: docker/mysql/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
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: docker/angular/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
build-nginx-dev:
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 }}
tags: |
type=raw,value=ceam
- 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-dev.conf
build-redis:
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.REDIS_IMAGE }}
- name: Build and push Cyanweb Redis Docker image
uses: docker/build-push-action@v2
with:
context: .
file: docker/redis/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}