From 0c85687a6e518480bb296866a94cc9fc30707873 Mon Sep 17 00:00:00 2001 From: Nikhil P Bonte <89625355+nikhilbonte21@users.noreply.github.com> Date: Fri, 22 Dec 2023 16:32:23 +0530 Subject: [PATCH] Update maven.yml --- .github/workflows/maven.yml | 38 ++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a8c369cb12..58bed6dc7d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -25,6 +25,7 @@ on: - beta - development - master + - staging - lineageondemand jobs: @@ -77,7 +78,7 @@ jobs: shell: bash - name: Get version tag - run: echo "##[set-output name=version;]$(echo `git ls-remote https://${{ secrets.my_pat }}@github.com/atlanhq/${REPOSITORY_NAME}.git ${{ steps.get_branch.outputs.branch }} | awk '{ print $1}' | cut -c1-7`)abcd" + run: echo "##[set-output name=version;]$(echo `git ls-remote https://${{ secrets.my_pat }}@github.com/atlanhq/${REPOSITORY_NAME}.git refs/heads/${{ steps.get_branch.outputs.branch }} | awk '{ print $1}' | cut -c1-7`)abcd" id: get_version - name: Set up Buildx @@ -104,3 +105,38 @@ jobs: 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 }} + - name: Scan Image + uses: aquasecurity/trivy-action@master + with: + image-ref: 'ubuntu:18.04' + vuln-type: 'os,library' + format: 'sarif' + output: 'trivy-image-results.sarif' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2.1.33 + with: + sarif_file: 'trivy-image-results.sarif' + + - name: Check out into atlan repo + uses: actions/checkout@v2 + with: + ref: ${{ steps.get_branch.outputs.branch }} + repository: atlanhq/atlan + token: ${{ secrets.my_pat }} + + - name: Add Changelog + run: | + mkdir -p gitlog + echo "- ${{ github.event.head_commit.message }}">>gitlog/${{ github.event.repository.name }}.txt + chmod +x ./scripts/create_changelog.sh + ./scripts/create_changelog.sh + - name: Commit changes + uses: EndBug/add-and-commit@v7 + with: + branch: ${{ steps.get_branch.outputs.branch }} + author_name: atlan-ci + author_email: it@atlan.com + message: '${{ github.event.repository.name }}' + default_author: user_info + push: origin ${{ steps.get_branch.outputs.branch }}