Skip to content

Merge pull request #65 from SAP-samples/update-cw47 #46

Merge pull request #65 from SAP-samples/update-cw47

Merge pull request #65 from SAP-samples/update-cw47 #46

name: Build and Push Docker Image
on:
push:
branches:
- 'main'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build_and_push_business-partner-mock:
name: Business Partner Mock
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit id
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-business-partner-mock
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ./code/easyfranchise/deployment/docker/Dockerfile-business-partner-mock
build-args: |
EASYFRANCHISE_VERSION_GIT_ARG=${{ steps.vars.outputs.sha_short }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_and_push_broker:
name: SaaS Broker
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit id
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-broker
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ./code/easyfranchise/deployment/docker/Dockerfile-broker
build-args: |
EASYFRANCHISE_VERSION_GIT_ARG=${{ steps.vars.outputs.sha_short }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_and_push_approuter:
name: Approuter
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit id
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-approuter
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ./code/easyfranchise/deployment/docker/Dockerfile-approuter
build-args: |
EASYFRANCHISE_VERSION_GIT_ARG=${{ steps.vars.outputs.sha_short }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_and_push_bp_service:
name: Business Partner Service
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit id
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-bp-service
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ./code/easyfranchise/deployment/docker/Dockerfile-bp-service
build-args: |
EASYFRANCHISE_VERSION_GIT_ARG=${{ steps.vars.outputs.sha_short }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_and_push_db_service:
name: DB Service
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit id
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-db-service
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ./code/easyfranchise/deployment/docker/Dockerfile-db-service
build-args: |
EASYFRANCHISE_VERSION_GIT_ARG=${{ steps.vars.outputs.sha_short }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_and_push_ef_service:
name: EasyFranchise Service
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit id
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ef-service
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ./code/easyfranchise/deployment/docker/Dockerfile-ef-service
build-args: |
EASYFRANCHISE_VERSION_GIT_ARG=${{ steps.vars.outputs.sha_short }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_and_push_email-service:
name: Email Service
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit id
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-email-service
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ./code/easyfranchise/deployment/docker/Dockerfile-email-service
build-args: |
EASYFRANCHISE_VERSION_GIT_ARG=${{ steps.vars.outputs.sha_short }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_and_push_ui:
name: UI
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit id
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ui
- name: Build Docker image
uses: docker/[email protected]
with:
context: .
file: ./code/easyfranchise/deployment/docker/Dockerfile-ui
build-args: |
EASYFRANCHISE_VERSION_GIT_ARG=${{ steps.vars.outputs.sha_short }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}