Skip to content

Commit

Permalink
Create halyard-oes-branch.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yugaa22 authored Sep 19, 2023
1 parent 0efcd12 commit f9c4b85
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/halyard-oes-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Branch Build halyard with local branch

on:
workflow_call:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
org:
# Friendly description to be shown in the UI instead of 'name'
description: 'Organisation name'
# Default value if no value is explicitly provided
default: 'opsmx'
# Input has to be provided for the workflow to run
required: true
# The data type of the input
type: string
branch:
# Friendly description to be shown in the UI instead of 'name'
description: 'Branch name'
# Default value if no value is explicitly provided
default: 'master'
# Input has to be provided for the workflow to run
required: true
# The data type of the input
type: string


env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g
CONTAINER_REGISTRY: quay.io/opsmxpublic

jobs:
branch-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: ${{ inputs.org }}/halyard-oes
ref: refs/heads/${{ inputs.branch }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
- name: Prepare build variables
id: build_variables
run: |
echo ::set-output name=REPO::ubi8-halyard-cve
echo ::set-output name=VERSION::"1.55.1$(date --utc +'%Y%m%d%H%M')"
- name: Login to Quay
uses: docker/login-action@v1
# use service account flow defined at: https://github.com/docker/login-action#service-account-based-authentication-1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_KEY }}
- name: Build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }}
run: |
sed -e 's/NEXUS_USERNAME/${{ secrets.NEXUS_USERNAME }}/' -i settings.gradle
sed -e 's/NEXUS_PASSWORD/${{ secrets.NEXUS_PASSWORD }}/' -i settings.gradle
sed -e 's/NEXUS_USERNAME/${{ secrets.NEXUS_USERNAME }}/' -i build.gradle
sed -e 's/NEXUS_PASSWORD/${{ secrets.NEXUS_PASSWORD }}/' -i build.gradle
./gradlew --no-daemon -PenableCrossCompilerPlugin=true halyard-web:installDist -x test
- name: dockerBuildpush
uses: docker/build-push-action@v2
with:
context: .
file: docker/ubi8/Dockerfile-fips
push: true
tags: |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}"

0 comments on commit f9c4b85

Please sign in to comment.