Skip to content

Commit

Permalink
Correct fossa workflow. Add triggered events
Browse files Browse the repository at this point in the history
  • Loading branch information
OptimumCode committed Aug 3, 2024
1 parent e573239 commit 66eb488
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/fossa-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
pull_request_target:
branches:
- main
push:
branches:
- main
paths:
- 'gradle/libs.versions.toml'
workflow_dispatch:

jobs:
dump-unicode-data:
Expand All @@ -16,8 +22,8 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-java@v4
with:
distribution: temurin
Expand All @@ -43,13 +49,12 @@ jobs:
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Install fossa cli
run: "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash"
- name: Run FOSSA analyze
run: fossa analyze --project json-schema-validator --branch ${{ github.event.pull_request.head.ref }}
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
- name: Run FOSSA analyze
run: fossa test --project json-schema-validator
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
- uses: fossas/fossa-action@v1
with:
api-key: ${{secrets.FOSSA_API_KEY}}
branch: ${{ github.event.pull_request.head.ref || github.ref_name }}
- uses: fossas/fossa-action@v1
if: github.event_name != 'push'
with:
api-key: ${{secrets.FOSSA_API_KEY}}
run-tests: true

0 comments on commit 66eb488

Please sign in to comment.