-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
taha.attari@smilecdr.com
committed
Dec 13, 2024
1 parent
bea1ca0
commit 34f01c9
Showing
1 changed file
with
44 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,46 @@ | ||
name: Publish Snapshot VSM Operations | ||
name: Publish Snapshot | ||
on: | ||
push: | ||
branches: | ||
- hapi-7-5-4 | ||
push: | ||
branches: | ||
- hapi-7-5-4 | ||
|
||
jobs: | ||
maven: | ||
runs-on: ubuntu-latest | ||
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 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ vars.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Install | ||
run: ./scripts/install.sh | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: alphora/cqf-ruler:cqf-ruler-vsm | ||
build-args: COMMIT_HASH=${{ env.SHORT_SHA }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
maven: | ||
runs-on: ubuntu-latest | ||
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@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 21 | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: Package jars | ||
run: ./mvnw -T 4 --batch-mode -no-transfer-progress --update-snapshots package | ||
env: | ||
MAVEN_USERNAME: ${{ vars.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ vars.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: | | ||
contentgroup/cqf-ruler:latest | ||
alphora/cqf-ruler:latest | ||
build-args: COMMIT_HASH=${{ env.SHORT_SHA }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |