Skip to content

Commit

Permalink
Enable build on branch to test before merging
Browse files Browse the repository at this point in the history
  • Loading branch information
krsoninikhil committed Nov 26, 2024
1 parent a6b6041 commit b3ea0b9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
- development
- master
- dg1908
- ns/fix/delta-refresh

jobs:
build:
Expand All @@ -48,7 +49,9 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Get branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "##[set-output name=branch_lower;]$(echo ${GITHUB_REF#refs/heads/} | awk '{gsub("/", "-"); print tolower($0)}')"
id: get_branch

- name: Create Maven Settings
Expand All @@ -63,7 +66,7 @@ jobs:
- name: Build with Maven
run: |
branch_name=${{ steps.get_branch.outputs.branch }}
branch_name='${{ steps.get_branch.outputs.branch }}'
if [[ $branch_name == 'main' || $branch_name == 'master' || $branch_name == 'dg1908' ]]
then
echo "build without dashboard"
Expand Down Expand Up @@ -102,8 +105,8 @@ jobs:
provenance: true
push: true
tags: |
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_branch.outputs.branch }}:latest
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_branch.outputs.branch }}:${{ steps.get_version.outputs.version }}
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_branch.outputs.branch_lower }}:latest
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ steps.get_branch.outputs.branch_lower }}:${{ steps.get_version.outputs.version }}
- name: Scan Image
uses: aquasecurity/trivy-action@master
Expand Down

0 comments on commit b3ea0b9

Please sign in to comment.