update scripts and yaml #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Snapshot VSM Operations | |
on: pull_request | |
jobs: | |
maven: | |
runs-on: ubuntu-latest | |
services: | |
registry: | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
steps: | |
- name: Add SHORT_SHA env property with commit short sha | |
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 11 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
driver-opts: network=host | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Install base | |
run: ./scripts/install.sh | |
- name: Install ecr plugin | |
run: ./scripts/install_ecr.sh | |
- name: Build base image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
tags: localhost:5000/alphora/cqf-ruler:cqf-ruler-vsm-base | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
- name: Build and push with transform plugin | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./ecr | |
file: ./ecr/Dockerfile_local | |
push: true | |
tags: alphora/cqf-ruler:cqf-ruler-vsm-test | |
platforms: linux/amd64,linux/arm64 | |
build-args: COMMIT_HASH=${{ env.SHORT_SHA }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |