diff --git a/.github/workflows/fossa-caos.yml b/.github/workflows/fossa-caos.yml index 304dc17..8af3c9e 100644 --- a/.github/workflows/fossa-caos.yml +++ b/.github/workflows/fossa-caos.yml @@ -23,6 +23,8 @@ jobs: ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} + HAS_FOSSA_TARGETS: "" + FOSSA_ANALYZE_RESULT: "" steps: - uses: actions/checkout@v3 @@ -48,10 +50,11 @@ jobs: then echo "::notice::Fossa found analysis targets." cat $LIST_TARGETS_OUT_FILE - echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_ENV" else echo "::warning::Fossa did not find any analysis targets." - echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_ENV" + echo "FOSSA_ANALYZE_RESULT=N/A" >> "$GITHUB_ENV" fi - name: Set fossaHasTargets custom property run: | @@ -61,7 +64,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value": "'"$HAS_FOSSA_TARGETS"'"}]}' - id: fossa-analyze name: Run fossa analyze if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'True'}} @@ -73,10 +76,10 @@ jobs: then echo "::error::fossa analyze ran with errors." cat $ANALYZE_ERR_FILE - echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_ENV" else cat $ANALYZE_OUT_FILE - echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_ENV" fi - name: Set fossaAnalyzeResult custom property run: | @@ -86,7 +89,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value": "'"$FOSSA_ANALYZE_RESULT"'"}]}' - name: Exit if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'Error' || steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT == 'Error' }} run: exit 1 diff --git a/.github/workflows/fossa-default.yml b/.github/workflows/fossa-default.yml index 9a36be8..f3465f3 100644 --- a/.github/workflows/fossa-default.yml +++ b/.github/workflows/fossa-default.yml @@ -23,6 +23,8 @@ jobs: ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} + HAS_FOSSA_TARGETS: "" + FOSSA_ANALYZE_RESULT: "" steps: - uses: actions/checkout@v3 @@ -39,15 +41,16 @@ jobs: then echo "::error::fossa list-targets ran with errors." cat $LIST_TARGETS_ERR_FILE - echo "HAS_FOSSA_TARGETS=Error" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=Error" >> "$GITHUB_ENV" elif [[ $(cat $LIST_TARGETS_OUT_FILE | wc -l) -gt 0 ]] then echo "::notice::Fossa found analysis targets." cat $LIST_TARGETS_OUT_FILE - echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_ENV" else echo "::warning::Fossa did not find any analysis targets." - echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_ENV" + echo "FOSSA_ANALYZE_RESULT=N/A" >> "$GITHUB_ENV" fi - name: Set fossaHasTargets custom property run: | @@ -57,7 +60,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value": "'"$HAS_FOSSA_TARGETS"'"}]}' - id: fossa-analyze name: Run fossa analyze if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'True'}} @@ -69,10 +72,10 @@ jobs: then echo "::error::fossa analyze ran with errors." cat $ANALYZE_ERR_FILE - echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_ENV" else cat $ANALYZE_OUT_FILE - echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_ENV" fi - name: Set fossaAnalyzeResult custom property run: | @@ -82,7 +85,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value": "'"$FOSSA_ANALYZE_RESULT"'"}]}' - name: Exit if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'Error' || steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT == 'Error' }} run: exit 1 diff --git a/.github/workflows/fossa-elixir.yml b/.github/workflows/fossa-elixir.yml index 3726689..64cc5d9 100644 --- a/.github/workflows/fossa-elixir.yml +++ b/.github/workflows/fossa-elixir.yml @@ -23,6 +23,8 @@ jobs: ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} + HAS_FOSSA_TARGETS: "" + FOSSA_ANALYZE_RESULT: "" steps: - uses: actions/checkout@v3 @@ -48,10 +50,11 @@ jobs: then echo "::notice::Fossa found analysis targets." cat $LIST_TARGETS_OUT_FILE - echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_ENV" else echo "::warning::Fossa did not find any analysis targets." - echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_ENV" + echo "FOSSA_ANALYZE_RESULT=N/A" >> "$GITHUB_ENV" fi - name: Set fossaHasTargets custom property run: | @@ -61,7 +64,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value": "'"$HAS_FOSSA_TARGETS"'"}]}' - id: fossa-analyze name: Run fossa analyze if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'True'}} @@ -73,10 +76,10 @@ jobs: then echo "::error::fossa analyze ran with errors." cat $ANALYZE_ERR_FILE - echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_ENV" else cat $ANALYZE_OUT_FILE - echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_ENV" fi - name: Set fossaAnalyzeResult custom property run: | @@ -86,7 +89,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value": "'"$FOSSA_ANALYZE_RESULT"'"}]}' - name: Exit if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'Error' || steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT == 'Error' }} run: exit 1 diff --git a/.github/workflows/fossa-gradle.yml b/.github/workflows/fossa-gradle.yml index 97cbdf0..454b8f9 100644 --- a/.github/workflows/fossa-gradle.yml +++ b/.github/workflows/fossa-gradle.yml @@ -23,6 +23,8 @@ jobs: ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} + HAS_FOSSA_TARGETS: "" + FOSSA_ANALYZE_RESULT: "" steps: - name: Checkout this repo @@ -67,10 +69,11 @@ jobs: then echo "::notice::Fossa found analysis targets." cat $LIST_TARGETS_OUT_FILE - echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_ENV" else echo "::warning::Fossa did not find any analysis targets." - echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_ENV" + echo "FOSSA_ANALYZE_RESULT=N/A" >> "$GITHUB_ENV" fi - name: Set fossaHasTargets custom property run: | @@ -80,7 +83,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value": "'"$HAS_FOSSA_TARGETS"'"}]}' - id: fossa-analyze name: Run fossa analyze if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'True'}} @@ -92,10 +95,10 @@ jobs: then echo "::error::fossa analyze ran with errors." cat $ANALYZE_ERR_FILE - echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_ENV" else cat $ANALYZE_OUT_FILE - echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_ENV" fi - name: Set fossaAnalyzeResult custom property run: | @@ -105,7 +108,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value": "'"$FOSSA_ANALYZE_RESULT"'"}]}' - name: Exit if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'Error' || steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT == 'Error' }} run: exit 1 diff --git a/.github/workflows/fossa-ruby-bundler.yml b/.github/workflows/fossa-ruby-bundler.yml index cbf2b68..2a57e6b 100644 --- a/.github/workflows/fossa-ruby-bundler.yml +++ b/.github/workflows/fossa-ruby-bundler.yml @@ -23,6 +23,8 @@ jobs: ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} + HAS_FOSSA_TARGETS: "" + FOSSA_ANALYZE_RESULT: "" steps: - uses: actions/checkout@v3 @@ -47,10 +49,11 @@ jobs: then echo "::notice::Fossa found analysis targets." cat $LIST_TARGETS_OUT_FILE - echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_ENV" else echo "::warning::Fossa did not find any analysis targets." - echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_ENV" + echo "FOSSA_ANALYZE_RESULT=N/A" >> "$GITHUB_ENV" fi - name: Set fossaHasTargets custom property run: | @@ -60,7 +63,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value": "'"$HAS_FOSSA_TARGETS"'"}]}' - id: fossa-analyze name: Run fossa analyze if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'True'}} @@ -72,10 +75,10 @@ jobs: then echo "::error::fossa analyze ran with errors." cat $ANALYZE_ERR_FILE - echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_ENV" else cat $ANALYZE_OUT_FILE - echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_ENV" fi - name: Set fossaAnalyzeResult custom property run: | @@ -85,7 +88,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value": "'"$FOSSA_ANALYZE_RESULT"'"}]}' - name: Exit if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'Error' || steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT == 'Error' }} run: exit 1 diff --git a/.github/workflows/fossa-scala.yml b/.github/workflows/fossa-scala.yml index 71d1716..755b68e 100644 --- a/.github/workflows/fossa-scala.yml +++ b/.github/workflows/fossa-scala.yml @@ -49,10 +49,11 @@ jobs: then echo "::notice::Fossa found analysis targets." cat $LIST_TARGETS_OUT_FILE - echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=True" >> "$GITHUB_ENV" else echo "::warning::Fossa did not find any analysis targets." - echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_OUTPUT" + echo "HAS_FOSSA_TARGETS=False" >> "$GITHUB_ENV" + echo "FOSSA_ANALYZE_RESULT=N/A" >> "$GITHUB_ENV" fi - name: Set fossaHasTargets custom property run: | @@ -62,7 +63,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value": "'"$HAS_FOSSA_TARGETS"'"}]}' - id: fossa-analyze name: Run fossa analyze if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'True'}} @@ -74,10 +75,10 @@ jobs: then echo "::error::fossa analyze ran with errors." cat $ANALYZE_ERR_FILE - echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Error" >> "$GITHUB_ENV" else cat $ANALYZE_OUT_FILE - echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_OUTPUT" + echo "FOSSA_ANALYZE_RESULT=Success" >> "$GITHUB_ENV" fi - name: Set fossaAnalyzeResult custom property run: | @@ -87,7 +88,7 @@ jobs: -H "Authorization: Bearer $CUSTOM_PROPS_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ - -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' + -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value": "'"$FOSSA_ANALYZE_RESULT"'"}]}' - name: Exit if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'Error' || steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT == 'Error' }} run: exit 1