Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify two errors in create-job-badge and license-scan workflow. #5718

Merged
merged 8 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/actions/create-job-status-badge/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ runs:
run: if [ ${{ env.JOB-STATUS }} == "success" ] ; then echo "COLOR=green" >> $GITHUB_ENV ; else echo "COLOR=red" >> $GITHUB_ENV; fi

- name: Create job badge
if: ${{ inputs.type == 'job' }}
if: ${{ inputs.type == 'job' && inputs.secret != '' }}
uses: analytics-zoo/dynamic-badges-action@master
with:
auth: ${{ inputs.secret }}
Expand All @@ -49,7 +49,7 @@ runs:
color: ${{ env.COLOR }}

- name: Create time badge
if: ${{ inputs.type == 'workflow' }}
if: ${{ inputs.type == 'workflow' && inputs.secret != '' }}
uses: analytics-zoo/dynamic-badges-action@master
with:
auth: ${{ inputs.secret }}
Expand All @@ -58,3 +58,9 @@ runs:
filename: ${{ inputs.file-name }}
label: Time is
message: ${{ env.TIME }}

- name: print error message
if: ${{ inputs.secret == '' }}
shell: bash
run: |
echo "Can not get secret! Please check out your workflow!(mainly caused by pr trigger)"
48 changes: 24 additions & 24 deletions .github/workflows/license-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:
fossa-scan:
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
- name: "Checkout Code"
uses: actions/checkout@v3

- name: "Run FOSSA Scan"
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
with:
api-key: ${{ secrets.FOSSAAPIKEY }}
- name: "Run FOSSA Test"
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
with:
api-key: ${{ secrets.FOSSAAPIKEY }}
run-tests: true
- name: "Filter the Dependency Tree"
- name: "Run FOSSA Scan"
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
with:
api-key: ${{ secrets.FOSSAAPIKEY }}

- name: "Run FOSSA Test"
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
with:
api-key: ${{ secrets.FOSSAAPIKEY }}
run-tests: true

- name: "Filter the Dependency Tree"
if: ${{ failure() }}
run: |
sed -i 's/<artifactId>${spark-version.project}<\/artifactId>/<artifactId>${spark-version.project}-${SPARK_PLATFORM}<\/artifactId>/' scala/dllib/pom.xml
Expand All @@ -47,16 +47,16 @@ jobs:
cd scala
mvn -P spark_3.x dependency:tree -Dspark.version=3.1.2 -DSPARK_PLATFORM=SPARK_3.1
- name: Create Job Badge
if: ${{ always() }}
uses: ./.github/actions/create-job-status-badge
with:
secret: ${{ secrets.GIST_SECRET }}
gist-id: f91eb10af4d9dbe216ba0f0da71cace9
is-self-hosted-runner: false
file-name: fossa-scan.json
type: job
job-name: fossa-scan
- name: Create Job Badge
if: ${{ always() }}
uses: ./.github/actions/create-job-status-badge
with:
secret: ${{ secrets.GIST_SECRET }}
gist-id: f91eb10af4d9dbe216ba0f0da71cace9
is-self-hosted-runner: false
file-name: fossa-scan.json
type: job
job-name: fossa-scan


create-workflow-badge:
Expand Down