forked from apache/atlas
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'janusoptimisation' into janusupgrademultiquery
- Loading branch information
Showing
2 changed files
with
12 additions
and
9 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 |
---|---|---|
|
@@ -50,8 +50,9 @@ jobs: | |
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Get branch name | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: get_branch | ||
run: | | ||
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
echo BRANCH_NAME=${GITHUB_REF#refs/heads/} | ||
- name: Create Maven Settings | ||
uses: s4u/[email protected] | ||
|
@@ -65,7 +66,7 @@ jobs: | |
- name: Build with Maven | ||
run: | | ||
branch_name=${{ steps.get_branch.outputs.branch }} | ||
branch_name=${{ env.BRANCH_NAME }} | ||
if [[ $branch_name == 'main' || $branch_name == 'master' || $branch_name == 'lineageondemand' ]] | ||
then | ||
echo "build without dashboard" | ||
|
@@ -75,12 +76,12 @@ jobs: | |
chmod +x ./build.sh && ./build.sh | ||
fi | ||
- run: echo "REPOSITORY_NAME=`echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//"`" >> $GITHUB_ENV | ||
- name: Get Repository Name | ||
run: echo "REPOSITORY_NAME=`echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//"`" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Get version tag | ||
run: echo "##[set-output name=version;]$(echo `git ls-remote https://${{ secrets.ORG_PAT_GITHUB }}@github.com/atlanhq/${REPOSITORY_NAME}.git ${{ steps.get_branch.outputs.branch }} | awk '{ print $1}' | cut -c1-7`)abcd" | ||
id: get_version | ||
- name: Get commit ID | ||
run: echo "COMMIT_ID=$(echo ${GITHUB_SHA} | cut -c1-7)abcd" >> $GITHUB_ENV | ||
|
||
- name: Set up Buildx | ||
id: buildx | ||
|
@@ -104,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 }}-${{ env.BRANCH_NAME }}:latest | ||
ghcr.io/atlanhq/${{ github.event.repository.name }}-${{ env.BRANCH_NAME }}:${{ env.COMMIT_ID }} | ||
- name: Scan Image | ||
uses: aquasecurity/trivy-action@master | ||
|
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