Skip to content

Build Efiling API Image and Push to Openshift 4 Registry #257

Build Efiling API Image and Push to Openshift 4 Registry

Build Efiling API Image and Push to Openshift 4 Registry #257

name: Build Efiling API Image and Push to Openshift 4 Registry
on:
push:
branches: [master]
paths:
- "src/backend/**"
- ".github/workflows/dev-efiling-admin-build-4.yml"
workflow_dispatch:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cluster Login
uses: redhat-developer/[email protected]
with:
openshift_server_url: ${{ secrets.OPENSHIFT4_SERVER_URL }}
parameters: '{"apitoken": "${{ secrets.OPENSHIFT4_SA_PASSWORD }}"}'
cmd: |
'version'
- name: Login to Openshift Docker
run : |
docker login ${{ secrets.OPENSHIFT4_EXTERNAL_REPOSITORY }} -u ${{ secrets.OPENSHIFT4_SA_USERNAME }} -p ${{ secrets.OPENSHIFT4_SA_PASSWORD }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build the Docker image
env:
MVN_PROFILE: efiling-api,splunk
run: |
docker-compose build efiling-api
docker image ls
docker tag jag-file-submission_efiling-api ${{ secrets.OPENSHIFT4_EXTERNAL_REPOSITORY }}/${{ secrets.OPENSHIFT4_TOOLS_NAMESPACE }}/efiling-api:latest
docker push ${{ secrets.OPENSHIFT4_EXTERNAL_REPOSITORY }}/${{ secrets.OPENSHIFT4_TOOLS_NAMESPACE }}/efiling-api:latest