Skip to content

Commit

Permalink
[APHL-630] different jobs for master and vsm ops
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 1, 2023
1 parent a99a9c4 commit d031b2c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish-snapshot-vsm-operations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Snapshot
on:
push:
branches:
- vsm_operations
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: 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
12 changes: 10 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Publish Snapshot
on:
push:
branches:
- vsm_operations
- master

jobs:
maven:
runs-on: ubuntu-latest
Expand All @@ -19,6 +20,11 @@ jobs:
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish snapshot
run: mvn --batch-mode -no-transfer-progress --update-snapshots deploy
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
Expand All @@ -32,7 +38,9 @@ jobs:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: alphora/cqf-ruler:cqf-ruler-vsm
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

0 comments on commit d031b2c

Please sign in to comment.