Skip to content

fix: auto-approve PRs from attune-release-bot (#345) #693

fix: auto-approve PRs from attune-release-bot (#345)

fix: auto-approve PRs from attune-release-bot (#345) #693

Workflow file for this run

name: License Compliance
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group: {}
workflow_dispatch: {}
permissions:
contents: read
concurrency:
group: fossa-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
FOSSA_CLI_VERSION: "3.17.10"
jobs:
fossa:
name: FOSSA License Scan
if: github.event.pull_request.user.login != 'dependabot[bot]'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: ./.github/actions/install-binary-tool
with:
name: fossa
version: ${{ env.FOSSA_CLI_VERSION }}
install-command: |
curl -sfL "https://github.com/fossas/fossa-cli/releases/download/v${{ env.FOSSA_CLI_VERSION }}/fossa_${{ env.FOSSA_CLI_VERSION }}_linux_amd64.tar.gz" \
| tar xz -C "$TOOL_DIR" fossa
- name: Run FOSSA analysis
run: fossa analyze
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
fossa-test:
name: FOSSA License Check
if: github.event.pull_request.user.login != 'dependabot[bot]'
runs-on: ubuntu-latest
timeout-minutes: 10
needs: fossa
steps:
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: ./.github/actions/install-binary-tool
with:
name: fossa
version: ${{ env.FOSSA_CLI_VERSION }}
install-command: |
curl -sfL "https://github.com/fossas/fossa-cli/releases/download/v${{ env.FOSSA_CLI_VERSION }}/fossa_${{ env.FOSSA_CLI_VERSION }}_linux_amd64.tar.gz" \
| tar xz -C "$TOOL_DIR" fossa
- name: Run FOSSA license check
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
run: |
set +e
fossa test --format json > fossa-results.json 2>fossa-stderr.txt
TEST_EXIT=$?
set -e
if [ "$TEST_EXIT" -eq 0 ]; then
echo "FOSSA test passed with no issues."
exit 0
fi
echo "FOSSA test found issues. Filtering known false positives..."
cat fossa-stderr.txt
python3 scripts/fossa-filter.py fossa-results.json fossa-stderr.txt