Skip to content

Ocelot.api gateway (#41) #94

Ocelot.api gateway (#41)

Ocelot.api gateway (#41) #94

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Docker Builds
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths:
- src/**
- .github/workflows/docker.yml
env:
REGISTRY: mirolimmajidov
IDENTITY_IMAGE_NAME: identity.api
JOB_IMAGE_NAME: job.api
PAYMENT_IMAGE_NAME: payment.api
APIGATEWAYS_IMAGE_NAME: ocelot.apigateway
jobs:
push_to_registry:
name: Push Docker images to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Identity-API docker image
id: docker_build_identity
uses: docker/build-push-action@v2
with:
context: .
file: ./src/Services/Identity/Identity.API/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IDENTITY_IMAGE_NAME }}:latest
- name: Build and push Job-API docker image
id: docker_build_job
uses: docker/build-push-action@v2
with:
context: .
file: ./src/Services/Job/Job.API/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.JOB_IMAGE_NAME }}:latest
- name: Build and push Payment-API docker image
id: docker_build_payment
uses: docker/build-push-action@v2
with:
context: .
file: ./src/Services/Payment/Payment.API/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.PAYMENT_IMAGE_NAME }}:latest
- name: Build and push Ocelot ApiGateway docker image
id: docker_build_apigateway
uses: docker/build-push-action@v2
with:
context: .
file: ./src/Ocelot.ApiGateway/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.APIGATEWAYS_IMAGE_NAME }}:latest