Skip to content

Update README.md

Update README.md #28

name: 'Build and Scan Dependencies'
on:
push:
branches:
[main]
paths-ignore:
- .github/**
jobs:
build-and-scan-dependencies:
runs-on: ubuntu-latest
env:
JF_ENV_1: ${{ secrets.JF_ENV_1 }}
JFROG_BUILD_STATUS: PASS
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Build
env:
JF_INSTANCE_NAME: ${{ vars.JF_INSTANCE_NAME }}
run: |
# Configure the project
MVN_PATH=`which mvn` && export M2_HOME=`readlink -f $MVN_PATH | xargs dirname | xargs dirname`
jf mvn-config \
--server-id-resolve $JF_INSTANCE_NAME \
--repo-resolve-releases phoenix-maven-dev-virtual \
--repo-resolve-snapshots phoenix-maven-dev-virtual \
--repo-deploy-releases phoenix-maven-dev-virtual \
--repo-deploy-snapshots phoenix-maven-dev-virtual
# Build the project using JFrog CLI
jf mvn clean install \
--build-name=${{ github.repository }} \
--build-number=${{ github.run_number }}
- name: Audit Dependencies
run: |
jf audit --mvn
- name: Failure check
run: |
echo "JFROG_BUILD_STATUS=FAIL" >> $GITHUB_ENV
if: failure()
- name: Publish build
run: |
# Collect and store environment variables in the build-info
jf rt bce ${{ github.repository }} ${{ github.run_number }}
# Collect and store VCS details in the build-info
jf rt bag ${{ github.repository }} ${{ github.run_number }}
# Publish the build-info to Artifactory
jf rt bp ${{ github.repository }} ${{ github.run_number }}
if: always()
- name: Set GITHUB_SHA on Artifacts
run: |
jf rt sp --build ${{ github.repository }}/${{ github.run_number }} git_sha=${{ github.sha }}